LykosAI/StabilityMatrix · error · InvalidOperationException

Windows ROCm installation is not supported for the current…

Error message

Windows ROCm installation is not supported for the current machine.

What it means

InstallWindowsNativeTorchAsync first evaluates the machine state (RocmMachineState) for Windows ROCm compatibility. If state.IsCompatible is false, it throws InvalidOperationException using state.FailureReason when present, or the generic message that the current machine is not supported. This prevents installing ROCm torch on hardware/software that cannot run it.

Solutions

  1. Check state.FailureReason on the machine state to see the exact incompatibility before attempting install
  2. Verify the GPU's gfx architecture is one supported by Windows ROCm torch builds (e.g. gfx110X-dgpu) and upgrade hardware if not
  3. Use the alternative torch flow for unsupported hardware (e.g. ZLUDA or CPU/DirectML builds) that Stability Matrix offers
  4. Update the app/helper in case newer GPU support was added to the compatibility table

Example fix

// before
await rocmHelper.InstallWindowsNativeTorchAsync(venvRunner, ...); // unsupported GPU
// after
var state = await rocmHelper.GetMachineStateAsync();
if (!state.IsCompatible)
{
    ui.ShowMessage($"Windows ROCm not available: {state.FailureReason}");
    return;
}
await rocmHelper.InstallWindowsNativeTorchAsync(venvRunner, ...);
Defensive patterns

Strategy: validation

Validate before calling

var state = await rocmHelper.GetMachineStateAsync();
if (!state.IsCompatible)
{
    ShowMessage($"Windows ROCm unavailable: {state.FailureReason}");
    return;
}

Type guard

bool CanInstallRocm(RocmMachineState s) => s.IsCompatible && !string.IsNullOrWhiteSpace(s.MultiArchDeviceExtra);

Try / catch

try { await rocmHelper.InstallWindowsNativeTorchAsync(venvRunner, ...); }
catch (InvalidOperationException ex) when (ex.Message.Contains("not supported"))
{
    // offer ZLUDA/CPU fallback instead
}

Prevention

When it happens

Trigger: Calling InstallWindowsNativeTorchAsync on a machine whose GPU arch is not in the supported Windows ROCm list (e.g. unsupported gfx arch like gfx1030 on Windows, integrated GPUs, non-AMD GPU), or on a system failing the helper's compatibility checks.

Common situations: User with an older RDNA2 GPU (not supported by Windows ROCm wheels) tries the Windows ROCm install; running on a laptop with AMD iGPU only; NVIDIA card user selects the ROCm flow by mistake.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/6cfc5c433f47826c. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Core/Services/Rocm/RocmPackageHelper.cs:238

        return profile.InstallConfig with { SkipTorchInstall = true };
    }

    /// <summary>
    /// Installs the ROCm torch wheel set from the multi-arch index and verifies that the resulting torch installation reports usable ROCm metadata.
    /// </summary>
    public async Task InstallWindowsNativeTorchAsync(
        IPyVenvRunner venvRunner,
        InstalledPackage installedPackage,
        RocmPackageProfile profile,
        IProgress<ProgressReport>? progress = null,
        Action<ProcessOutput>? onConsoleOutput = null,
        CancellationToken cancellationToken = default
    )
    {
        var state = machineState.Value;
        if (!state.IsCompatible)
        {
            throw new InvalidOperationException(
                state.FailureReason ?? "Windows ROCm installation is not supported for the current machine."
            );
        }

        var multiArchDeviceExtra = state.MultiArchDeviceExtra;

        if (string.IsNullOrWhiteSpace(multiArchDeviceExtra))
        {
            throw new InvalidOperationException(
                $"No Windows ROCm multi-arch device extra is available for '{state.RuntimeGfxArch ?? "unknown"}'."
            );
        }

        progress?.Report(new ProgressReport(-1f, "Installing ROCm torch...", isIndeterminate: true));

        var installConfig = profile.InstallConfig;
        var multiArchPythonPackageIndexUrl = WindowsRocmSupport.GetMultiArchPythonPackageIndexUrl(
            state.RuntimeGfxArch

View on GitHub (pinned to af93d6ef57)