Skip to content

[Bug] Windows AMD ROCm installer replaces ROCm PyTorch, then torch import fails #7275

Closed

Description

@wei0124

Summary

On native Windows with an AMD GPU detected as gfx1103, the Unsloth Studio installer installs AMD's ROCm PyTorch wheel successfully, but the subsequent unsloth installation replaces it with a non-ROCm torch wheel. The Studio setup then fails because torch cannot be imported.

Environment

  • OS: Windows (native PowerShell)
  • Python: 3.13.14
  • GPU: AMD ROCm (gfx1103)
  • Installer: irm https://unsloth.ai/install.ps1 | iex
  • Unsloth: 2026.7.4

Steps to reproduce

  1. Run:

    $env:UNSLOTH_VERBOSE = "1"
    irm https://unsloth.ai/install.ps1 | iex
  2. Observe the installer install the AMD ROCm packages from:

    https://repo.amd.com/rocm/whl/gfx110X-all/
    
  3. During the PyTorch step, it installs:

    torch==2.11.0+rocm7.13.0
    torchaudio==2.11.0+rocm7.13.0
    torchvision==0.26.0+rocm7.13.0
    
  4. During the following installing unsloth step, the resolver uninstalls the ROCm wheel and installs:

    - torch==2.11.0+rocm7.13.0
    + torch==2.10.0
    
  5. Studio setup reports:

    Stale venv detected (torch could not be imported).
    [ERROR] The existing Unsloth environment needs repair.
    

Actual import error

After the failed install, importing Torch in the generated venv fails with:

OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.
Error loading "...\\site-packages\\torch\\lib\\c10.dll" or one of its dependencies.

Expected behavior

The installer should preserve the AMD ROCm PyTorch wheel (or install Unsloth without resolving/replacing torch) so that the virtual environment remains importable and Unsloth Studio can finish setup.

The installer rolls back correctly, but rerunning it repeats the same package replacement and failure.

Activity

  1. CSEliot commented on Aug 11, 2026

    @CSEliot

    Same or similar issue. And I believe is related to #8473 .

    Here's my install dump from unsloth desktop (same as unsloth studio):

    unslothInstallDump.txt

  2. danielhanchen commented on Aug 28, 2026

    @danielhanchen
    Member

    This should be fixed now - sorry on the delay - please update Unsloth Studio to the latest via curl -fsSL https://unsloth.ai/install.sh | sh for Linux, Mac, WSL or irm https://unsloth.ai/install.ps1 | iex for Windows - if it's not fixed yet, it'll be in the next Studio release - if it's still not working after that, please open another issue - appreciate it again!

    The Windows ROCm installer no longer replaces your ROCm PyTorch, and setup.ps1 now repairs the venv in place instead of aborting when torch cannot be imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions