{"record":{"id":"4ca14d91f7092dc3","repo":"LykosAI/StabilityMatrix","slug":"windows-rocm-package-commands-require-a-supported-windows","errorCode":null,"errorMessage":"Windows ROCm package commands require a supported Windows ROCm machine state.","messagePattern":"Windows ROCm package commands require a supported Windows ROCm machine state\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs","lineNumber":124,"sourceCode":"            case WindowsRocmPackageCommandType.BitsAndBytes:\n                await ExecuteBitsAndBytesAsync(venvRunner, pyVersion, progress).ConfigureAwait(false);\n                break;\n            case WindowsRocmPackageCommandType.FlashAttention:\n                await ExecuteFlashAttentionAsync(venvRunner, progress).ConfigureAwait(false);\n                break;\n            default:\n                throw new InvalidOperationException(\n                    $\"Unsupported Windows ROCm package command type: {CommandType}.\"\n                );\n        }\n    }\n\n    private void EnsureRocmCompatibility()\n    {\n        var compatibility = rocmPackageHelper.GetCompatibility();\n        if (!compatibility.IsCompatible)\n        {\n            throw new InvalidOperationException(\n                compatibility.FailureReason\n                    ?? \"Windows ROCm package commands require a supported Windows ROCm machine state.\"\n            );\n        }\n    }\n\n    private async Task EnsureVcBuildToolsAsync(IProgress<ProgressReport>? progress)\n    {\n        if (!prerequisiteHelper.IsVcBuildToolsInstalled)\n        {\n            await prerequisiteHelper\n                .InstallPackageRequirements([PackagePrerequisite.VcBuildTools], progress: progress)\n                .ConfigureAwait(false);\n        }\n    }\n\n    private async Task ExecuteDevelopmentSdkAsync(\n        IPyVenvRunner venvRunner,","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs#L106-L142","documentation":"EnsureRocmCompatibility calls IRocmPackageHelper.GetCompatibility() and throws this InvalidOperationException when the machine is not in a state supported for Windows ROCm packages (e.g. no compatible AMD GPU/driver, ROCm not detected). If the helper provides a FailureReason, that more specific reason is thrown instead; this message is the fallback. It runs before every ROCm command (SDK, SageAttention, bitsandbytes, FlashAttention).","triggerScenarios":"Executing any WindowsRocmPackageCommandType step on a Windows machine where GetCompatibility().IsCompatible is false: no AMD GPU, unsupported GPU model, outdated/broken AMD drivers, ROCm runtime not installed, or running in a VM without ROCm support.","commonSituations":"NVIDIA/Intel GPU users attempting ROCm one-click installs; AMD GPUs whose driver is too old for ROCm 7.x; clean Windows installs lacking HIP SDK; Windows VMs in cloud environments.","solutions":["Read the thrown FailureReason (or run the compatibility check via IRocmPackageHelper yourself) and address that specific issue first.","Install/update AMD Software (Adrenalin) drivers to a version supporting the required ROCm/HIP SDK on Windows.","Install the HIP SDK / Windows ROCm development prerequisites the helper expects, then retry.","If the GPU is not ROCm-compatible, use the CUDA or CPU variant of the package instead of Windows ROCm commands."],"exampleFix":"// before\nawait rocmStep.ExecuteAsync(progress);\n// after\nvar compat = rocmPackageHelper.GetCompatibility();\nif (!compat.IsCompatible)\n    throw new InvalidOperationException($\"ROCm unsupported: {compat.FailureReason}\");\nawait rocmStep.ExecuteAsync(progress);","handlingStrategy":"validation","validationCode":"var compat = rocmPackageHelper.GetCompatibility();\nif (!compat.IsCompatible)\n    throw new InvalidOperationException($\"Windows ROCm not supported: {compat.FailureReason}\");","typeGuard":null,"tryCatchPattern":"try\n{\n    await step.ExecuteAsync(progress);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Windows ROCm\"))\n{\n    // surface compat.FailureReason to user; suggest driver/HIP SDK install or CUDA/CPU variant\n}","preventionTips":["Run IRocmPackageHelper.GetCompatibility() before offering ROCm one-click options in the UI.","Keep AMD Adrenalin drivers and the HIP SDK up to date on target machines.","Only expose ROCm package commands on machines with supported AMD GPUs."],"tags":["unsupported-platform","rocm","amd","gpu","compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}