AMDGPUBackend is missing

I don’t really know what’s happening, I have reinstalled the AMDGPU package many times and it’s really missing. I’ve got the latest RoCM and Julia versions and nothing works. Could you help me import it? I am in a Jupyter environment for Python, here’s the error:

Thank you so so much

Hi, could you be slightly more explicit about what you are trying to achieve and how? What Julia package are you using? And ideally you have a minimal reproducer that would trigger the error (MWE) you are experiencing.

From within a Julia REPL, what is the output of:

using AMDGPU

AMDGPU.versioninfo()

Some useful background for new forum members can be found here.

Hello, here I am again. I’m trying to use AMDGPU to optimize perfomance of ODE solving in Python through the diffeqpy library, taking into account this example (Google Colab). I was just trying to execute “from diffeqpy import amdgpu”. Here the AMDGPU version you asked for :

[ Info: AMDGPU versioninfo
┌───────────┬──────────────────┬───────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐
│ Available │ Name             │ Version   │ Path                                                                                          │
├───────────┼──────────────────┼───────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│     +     │ LLD              │ -         │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\ld.lld.exe                                            │
│     +     │ Device Libraries │ -         │ C:\\Users\\hayak\\.julia\\artifacts\\5ad5ecb46e3c334821f54c1feecc6c152b7b6a45\\amdgcn/bitcode │
│     +     │ HIP              │ 5.7.31541 │ C:\\windows\\SYSTEM32\\amdhip64.DLL                                                           │
│     +     │ rocBLAS          │ 4.1.2     │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocblas.dll                                           │
│     +     │ rocSOLVER        │ 3.25.0    │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocsolver.dll                                         │
│     +     │ rocALUTION       │ -         │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocalution.dll                                        │
│     +     │ rocSPARSE        │ -         │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocsparse.dll                                         │
│     +     │ rocRAND          │ 2.10.5    │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocrand.dll                                           │
│     +     │ rocFFT           │ 1.0.21    │ C:\\Program Files\\AMD\\ROCm\\6.1\\bin\\rocfft.dll                                            │
│     -     │ MIOpen           │ -         │ -                                                                                             │
└───────────┴──────────────────┴───────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘

[ Info: AMDGPU devices
┌────┬─────────────────────────┬───────────────┬───────────┬───────────┐
│ Id │                    Name │      GCN arch │ Wavefront │    Memory │
├────┼─────────────────────────┼───────────────┼───────────┼───────────┤
│  1 │ AMD Radeon(TM) Graphics │ gfx90c:xnack- │        64 │ 6.060 GiB │
└────┴─────────────────────────┴───────────────┴───────────┴───────────┘```

Here the error in code block:

---------------------------------------------------------------------------
JuliaError                                Traceback (most recent call last)
Cell In[20], line 5
      3 from scipy.integrate import solve_ivp
      4 from scipy.integrate import odeint
----> 5 from diffeqpy import ode,amdgpu
      7 def Graficar_Global(t_total, y_total, Pa):
      8     # Crear una figura con una sola gráfica
      9     plt.figure(figsize=(12, 8))

File c:\Users\hayak\AppData\Local\Programs\Python\Python312\Lib\site-packages\diffeqpy\amdgpu.py:5
      3 amdgpu, _ = load_julia_packages("DiffEqGPU", "AMDGPU")
      4 from juliacall import Main
----> 5 amdgpu.AMDGPUBackend = Main.seval("AMDGPU.AMDGPUBackend") # kinda hacky
      6 sys.modules[__name__] = amdgpu # mutate myself

File ~\.julia\packages\PythonCall\Nr75f\src\JlWrap\module.jl:27, in seval(self, expr)
     25         return ValueBase.__dir__(self) + self._jl_callmethod($(pyjl_methodnum(pyjlmodule_dir)))
     26     def seval(self, expr):
---> 27         return self._jl_callmethod($(pyjl_methodnum(pyjlmodule_seval)), expr)
     28 """,
     29             @__FILE__(),

JuliaError: UndefVarError: `AMDGPUBackend` not defined
Stacktrace:
 [1] eval
   @ .\boot.jl:385 [inlined]
 [2] eval
   @ .\Base.jl:88 [inlined]
 [3] pyjlmodule_seval(self::Module, expr::Py)
   @ PythonCall.JlWrap C:\Users\hayak\.julia\packages\PythonCall\Nr75f\src\JlWrap\module.jl:13
 [4] _pyjl_callmethod(f::Any, self_::Ptr{PythonCall.C.PyObject}, args_::Ptr{PythonCall.C.PyObject}, nargs::Int64)
   @ PythonCall.JlWrap C:\Users\hayak\.julia\packages\PythonCall\Nr75f\src\JlWrap\base.jl:67
 [5] _pyjl_callmethod(o::Ptr{PythonCall.C.PyObject}, args::Ptr{PythonCall.C.PyObject})
   @ PythonCall.JlWrap.Cjl C:\Users\hayak\.julia\packages\PythonCall\Nr75f\src\JlWrap\C.jl:63

You want ROCBackend - which is passed through the DiffEq stack to KernelAbstractions.jl to launch kernels.