{"record":{"id":"be5cb17c804b4ff8","repo":"LykosAI/StabilityMatrix","slug":"windows-rocm-package-commands-are-only-supported-on-windows","errorCode":null,"errorMessage":"Windows ROCm package commands are only supported on Windows.","messagePattern":"Windows ROCm package commands are only supported on Windows\\.","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs","lineNumber":64,"sourceCode":"    public required DirectoryPath WorkingDirectory { get; init; }\n    public required WindowsRocmPackageCommandType CommandType { get; init; }\n    public IReadOnlyDictionary<string, string>? EnvironmentVariables { get; init; }\n\n    public string ProgressTitle =>\n        CommandType switch\n        {\n            WindowsRocmPackageCommandType.SageAttention => \"Installing Windows ROCm SageAttention\",\n            WindowsRocmPackageCommandType.DevelopmentSdk => \"Installing Windows ROCm Development SDK\",\n            WindowsRocmPackageCommandType.BitsAndBytes => \"Installing Windows ROCm bitsandbytes\",\n            WindowsRocmPackageCommandType.FlashAttention => \"Installing Windows ROCm Flash Attention\",\n            _ => \"Running Windows ROCm package command\",\n        };\n\n    public async Task ExecuteAsync(IProgress<ProgressReport>? progress = null)\n    {\n        if (!OperatingSystem.IsWindows())\n        {\n            throw new PlatformNotSupportedException(\n                \"Windows ROCm package commands are only supported on Windows.\"\n            );\n        }\n\n        if (InstalledPackage.FullPath is null)\n        {\n            throw new InvalidOperationException(\"Installed package path is not available.\");\n        }\n\n        var venvDir = WorkingDirectory.JoinDir(\"venv\");\n        if (!venvDir.Exists)\n        {\n            throw new DirectoryNotFoundException($\"ComfyUI venv was not found at '{venvDir.FullPath}'.\");\n        }\n\n        var pyVersion = PyVersion.Parse(InstalledPackage.PythonVersion);\n        if (pyVersion.StringValue == \"0.0.0\")\n        {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs#L46-L82","documentation":"InstallWindowsRocmPackageCommandStep.ExecuteAsync runs ROCm-related package commands that only exist on Windows; on other OSes it throws PlatformNotSupportedException before doing any work.","triggerScenarios":"Invoking ExecuteAsync on Linux/macOS for a package configured with Windows ROCm install commands.","commonSituations":"Shared package configs applied across platforms; users on Linux selecting a ROCm-enabled package variant meant for Windows.","solutions":["Run this package/command on Windows only","Use the Linux-native ROCm install path instead of the Windows ROCm step","Skip this step on non-Windows platforms in your install pipeline"],"exampleFix":"// before\nawait rocmStep.ExecuteAsync();\n// after\nif (OperatingSystem.IsWindows()) await rocmStep.ExecuteAsync(); else /* alternate path */","handlingStrategy":"type-guard","validationCode":"if (!OperatingSystem.IsWindows()) skipWindowsRocmStep();","typeGuard":"bool CanRunWindowsRocmStep() => OperatingSystem.IsWindows();","tryCatchPattern":"try { await step.ExecuteAsync(progress); } catch (PlatformNotSupportedException) { /* use platform-appropriate ROCm path or skip */ }","preventionTips":["Only attach Windows ROCm command steps on Windows builds","Route Linux ROCm users to the native install flow","Check InstalledPackage.FullPath is set before running package command steps"],"tags":["csharp","rocm","windows","platform"],"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"}