Skip to content

Radeon VII gfx906 [WinError 126] #129

@mayor686

Description

@mayor686

Info of my setup:

  1. Windows
  2. 4xRadeon VII gfx906
  3. AMD-Software-PRO-Edition-23.Q4-Win10-Win11-For-HIP Installed: ROCM 5.7 for windows (note: hipInfo.exe recognize all gpus)
  4. Driver Adrenaline 25.5.1
  5. Python 3.12.10
  6. in Path variable i added C:/Program Files/AMD/ROCM/5.7/bin
  7. ZLuda 3.9.5 for rocm 5
  8. I copied HIP Extensions inside C:/Program Files/AMD/ROCM/5.7/
  9. torch 2.3 - torchaudio 2.3 and torchvision 0.18 for cuda 11.8
  10. i patched torch with this:
    copy cublas.dll "%torch_dir%\cublas64_11.dll" /Y >nul 2>&1
    copy cusparse.dll "%torch_dir%\cusparse64_11.dll" /Y >nul 2>&1
    rename "%torch_dir%\nvrtc64_112_0.dll" nvrtc_cuda.dll >nul 2>&1
    copy nvrtc.dll "%torch_dir%\nvrtc64_112_0.dll" /Y >nul 2>&1

I'm trying to run comfyui but my real problem is "import torch"

(venv) C:\ComfyUI-Zluda>.\zluda\zluda.exe -- python testzluda.py

testzluda.py--------------------------------------------------------------------------------------
import torch

try:
# Check if CUDA is available
if not torch.cuda.is_available():
raise RuntimeError("CUDA is not available")

# Create tensors on the GPU
ten1 = torch.randn((2, 4), device="cuda")
ten2 = torch.randn((4, 8), device="cuda")

# Perform matrix multiplication
output = torch.mm(ten1, ten2)

# Print success message
print("zluda is correctly installed and working")

except Exception as e:
# Print failure message if any exception occurs
print(f"zluda isn't installed correctly: {e}")


Traceback (most recent call last):
File "C:\ComfyUI-Zluda\testzluda.py", line 1, in
import torch
File "C:\ComfyUI-Zluda\venv\Lib\site-packages\torch_init_.py", line 141, in
raise err
OSError: [WinError 126] Impossibile trovare il modulo specificato. Error loading "C:\ComfyUI-Zluda\venv\Lib\site-packages\torch\lib\cublas64_11.dll" or one of its dependencies.

Thanks for any help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions