Split any YouTube song into stems
TypeScript
gpu: AMD ROCm support for Linux splits (#19)
Daniel Ravina68f9429f7a08
diff --git a/README.md b/README.mdindex 607973e..5e6a7b9 100644--- a/README.md+++ b/README.md@@ -21,7 +21,7 @@ Everything runs locally — no accounts, no API keys. Your songs, searches and a- Per-stem mute/solo/volume, waveforms with click-to-seek- Parallel background splitting with live progress- Export any stem (or all) as WAV-- Fully offline after setup — separation runs on Apple Silicon (MPS), NVIDIA GPUs (CUDA) or CPU; ffmpeg included+- Fully offline after setup — separation runs on Apple Silicon (MPS), NVIDIA GPUs (CUDA), AMD GPUs on Linux (ROCm, experimental) or CPU; ffmpeg included## Download@@ -43,7 +43,7 @@ Optional quality upgrades live behind a gear icon in the app (Settings), each wi## Requirements-- **macOS 12+** (Apple Silicon) or **Windows 10/11** (x64) or **Linux x64** (Ubuntu 22.04+ or equivalent; NVIDIA driver for GPU splits)+- **macOS 12+** (Apple Silicon) or **Windows 10/11** (x64) or **Linux x64** (Ubuntu 22.04+ or equivalent; NVIDIA driver for GPU splits, AMD via ROCm on Linux — experimental)- No manual installs: if no Python 3.9+ is detected, StemKit downloads a private runtime (python-build-standalone) during first-launch setup- Node.js 20+ only for building from sourcediff --git a/python/roformer.py b/python/roformer.pyindex b901720..07b1131 100644--- a/python/roformer.py+++ b/python/roformer.py@@ -224,7 +224,7 @@ def main():# fail fast before the ~913MB checkpoint download on GPU-less machinesif args.device == "cuda" and not torch.cuda.is_available():- fail("GPU engine not available (no NVIDIA GPU, or the CUDA build of torch is not installed)")+ fail("GPU engine not available (no supported NVIDIA/AMD GPU, or the GPU build of torch is not installed)")ckpt_path = os.path.join(args.ckpt_dir, CKPT_NAME)if not os.path.exists(ckpt_path):diff --git a/python/separate.py b/python/separate.pyindex a7cf9c0..a333d34 100644--- a/python/separate.py+++ b/python/separate.py@@ -124,7 +124,7 @@ def main():else:device = args.deviceif device == "cuda" and not torch.cuda.is_available():- fail("GPU engine not available (no NVIDIA GPU, or the CUDA build of torch is not installed)")+ fail("GPU engine not available (no supported NVIDIA/AMD GPU, or the GPU build of torch is not installed)")emit(type="progress", stage="model", pct=0, message=f"loading {args.model} on {device}")from demucs.apply import apply_modeldiff --git a/src/main/env.ts b/src/main/env.tsindex 16b6677..516db60 100644--- a/src/main/env.ts+++ b/src/main/env.ts@@ -1,9 +1,9 @@import { spawn, execFile } from 'child_process'-import { existsSync, writeFileSync, readdirSync, createWriteStream, mkdirSync, chmodSync, unlinkSync, statSync, renameSync } from 'fs'+import { existsSync, writeFileSync, readdirSync, readFileSync, createWriteStream, mkdirSync, chmodSync, unlinkSync, statSync, renameSync } from 'fs'import { homedir } from 'os'import { join } from 'path'import { app, BrowserWindow, net } from 'electron'-import type { EngineStatus } from '../shared/types'+import type { EngineStatus, GpuVendor } from '../shared/types'export interface ToolInfo {found: boolean@@ -36,8 +36,9 @@ const IS_WIN = process.platform === 'win32'const EXE = IS_WIN ? '.exe' : ''const VENV_BIN = IS_WIN ? 'Scripts' : 'bin'-/* CUDA torch (the GPU engine swap) works on windows and linux; macOS stays- on MPS/CPU via the default torch build */+/* CUDA torch (the NVIDIA GPU engine swap) works on windows and linux; ROCm+ torch (AMD) is linux-only. macOS stays on MPS/CPU via the default torch+ build */const SUPPORTS_GPU = IS_WIN || process.platform === 'linux'export function venvDir(): string {@@ -160,13 +161,12 @@ export function gpuAccelerationInfo(): boolean | undefined {}let nvidiaProbe: Promise<boolean> | null = null-let nvidiaInfo: boolean | undefined/* windows + linux: whether an NVIDIA GPU is present (nvidia-smi ships with- the driver). Gates the GPU-acceleration toggle in Settings */+ the driver). Part of the vendor detection that gates the GPU-acceleration+ toggle in Settings */export function detectNvidiaGpu(): Promise<boolean> {if (!SUPPORTS_GPU) {- nvidiaInfo = falsereturn Promise.resolve(false)}if (!nvidiaProbe) {@@ -175,20 +175,57 @@ export function detectNvidiaGpu(): Promise<boolean> {['--query-gpu=name,memory.total', '--format=csv,noheader'],10000)- .then((out) => {- nvidiaInfo = /nvidia/i.test(out)- return nvidiaInfo- })- .catch(() => {- nvidiaInfo = false- return false- })+ .then((out) => /nvidia/i.test(out))+ .catch(() => false)}return nvidiaProbe}-export function nvidiaGpuInfo(): boolean | undefined {- return nvidiaInfo+let amdProbe: Promise<boolean> | null = null++/* linux only: whether an AMD GPU is present. sysfs needs no tools and works+ inside the AppImage (unlike lspci/rocminfo); 0x1002 is the AMD/ATI vendor+ id. Not a support statement — the compute preflight in ensureGpuEngine+ decides whether the ROCm torch can actually run on the card */+export function detectAmdGpu(): Promise<boolean> {+ if (process.platform !== 'linux') {+ return Promise.resolve(false)+ }+ if (!amdProbe) {+ amdProbe = (async () => {+ try {+ for (const entry of readdirSync('/sys/class/drm')) {+ if (!/^card\d+$/.test(entry)) continue+ try {+ const vendor = readFileSync(join('/sys/class/drm', entry, 'device', 'vendor'), 'utf8')+ if (vendor.trim() === '0x1002') return true+ } catch {}+ }+ } catch {}+ return false+ })()+ }+ return amdProbe+}++let vendorProbe: Promise<GpuVendor | null> | null = null+let vendorInfo: GpuVendor | null | undefined++/* which vendor GPU acceleration should target; NVIDIA wins when both are+ present (the CUDA path is better supported than ROCm) */+export function detectGpuVendor(): Promise<GpuVendor | null> {+ if (!vendorProbe) {+ vendorProbe = (async () => {+ const vendor = (await detectNvidiaGpu()) ? 'nvidia' : (await detectAmdGpu()) ? 'amd' : null+ vendorInfo = vendor+ return vendor+ })()+ }+ return vendorProbe+}++export function gpuVendorInfo(): GpuVendor | null | undefined {+ return vendorInfo}/* venvs created before the roformer engine lack a few small packages;@@ -698,21 +735,56 @@ export function ensureFtWeights(onProgress?: (pct: number) => void): Promise<booreturn ftWeightsPromise.then(detach)}-/* CUDA build of torch (windows/linux + nvidia). The default bootstrap- installs the CPU wheel from PyPI (on linux pinned to the cpu index, since- the default linux wheel would otherwise pull CUDA deps for everyone);- this swaps in the cu121 build (~2.5GB download) on demand when the- GPU-acceleration toggle is enabled. It stays installed when the toggle- goes back off — CUDA torch handles cpu devices fine */+/* GPU builds of torch. The default bootstrap installs the CPU wheel (on+ linux pinned to the cpu index, since the default linux wheel would+ otherwise pull CUDA deps for everyone); these swap in on demand when the+ GPU-acceleration toggle is enabled — cu121 for NVIDIA (~2.5GB download),+ rocm6.2 for AMD on linux. They stay installed when the toggle goes back+ off — GPU torch handles cpu devices fine */const GPU_TORCH_VERSION = '2.5.1'-const GPU_TORCH_INDEX = 'https://download.pytorch.org/whl/cu121'+const GPU_TORCH_INDEX: Record<GpuVendor, string> = {+ nvidia: 'https://download.pytorch.org/whl/cu121',+ amd: 'https://download.pytorch.org/whl/rocm6.2'+}++/* official rocm wheels ship kernel images for gfx90x/942, gfx1030 and+ gfx1100 only; consumer RDNA parts (RX 6600 = gfx1032, 7600 = gfx1102,+ 680M iGPU = gfx1035, …) need HSA_OVERRIDE_GFX_VERSION to run the nearest+ code object. The compute preflight below validates the result — if the+ override does not save the card, the CPU path stays in charge */+function gfxOverride(gfx: string): string | null {+ const id = parseInt((gfx.match(/gfx(\d+)/) ?? [])[1] ?? '', 10)+ if (Number.isNaN(id)) return null+ if (id >= 1010 && id <= 1039) return '10.3.0'+ if (id >= 1101 && id <= 1103) return '11.0.0'+ return null+}++/* the HSA override computed by the AMD preflight must survive restarts: the+ informational gpu probe (torch.cuda.is_available) passes without it, so a+ fresh session would otherwise skip the preflight and ship an override-less+ env to the separation runs */+function gpuOverrideFile(): string {+ return join(userDataDir(), '.gpu-override')+}++export function applyGpuOverride(): void {+ try {+ const saved = readFileSync(gpuOverrideFile(), 'utf8').trim()+ if (/^\d+\.\d+\.\d+$/.test(saved)) process.env.HSA_OVERRIDE_GFX_VERSION = saved+ } catch {}+}let gpuEnginePromise: Promise<boolean> | null = nullconst gpuProgressListeners = new Set<(pct: number) => void>()+/* requireVendor (with force off): only proceed when that vendor is the one+ detected on this machine. force (smoke test): install the named wheels+ regardless of detection */export function ensureGpuEngine(onProgress?: (pct: number) => void,- requireNvidia = false+ requireVendor?: GpuVendor | null,+ force = false): Promise<boolean> {if (onProgress) gpuProgressListeners.add(onProgress)const detach = (): boolean => {@@ -725,13 +797,23 @@ export function ensureGpuEngine(}if (!gpuEnginePromise) {gpuEnginePromise = (async () => {- // already swapped in: the venv's torch speaks CUDA, nothing to install+ // already swapped in: the venv's torch speaks to a GPU, nothing to installif (await hasGpuAcceleration()) return true- // the Settings toggle is gated on NVIDIA detection, but a stale setting- // or a failed nvidia-smi probe could still land here — don't pull- // ~2.5GB of CUDA torch on a machine that can't use it- if (requireNvidia && !(await detectNvidiaGpu())) return false- sendEnvEvent('Downloading the GPU engine (~2.5GB, one time)')+ // the Settings toggle is only rendered when a GPU was detected, but a+ // stale setting or a failed probe could still land here — don't pull+ // ~2.5GB of GPU torch on a machine that can't use it+ const detected = await detectGpuVendor()+ if (!force) {+ if (!detected) return false+ if (requireVendor && detected !== requireVendor) return false+ }+ const vendor: GpuVendor = force+ ? (requireVendor ?? detected ?? 'nvidia')+ : (detected ?? 'nvidia')+ // no ROCm wheels for windows: an AMD card there stays on CPU+ if (vendor === 'amd' && IS_WIN) return false+ const label = vendor === 'amd' ? 'AMD' : 'NVIDIA'+ sendEnvEvent(`Downloading the ${label} GPU engine (~2.5GB, one time)`)await new Promise<void>((resolve, reject) => {const child = spawn(venvPython(),@@ -741,13 +823,13 @@ export function ensureGpuEngine('install',// required: the CPU torch from bootstrap already satisfies the// version spec, so without -U pip would no-op and never swap in- // the cuda build+ // the gpu build'-U','--no-cache-dir',`torch==${GPU_TORCH_VERSION}`,`torchaudio==${GPU_TORCH_VERSION}`,'--index-url',- GPU_TORCH_INDEX+ GPU_TORCH_INDEX[vendor]],{ env: { ...process.env } })@@ -781,22 +863,76 @@ export function ensureGpuEngine()})})- // verify the swap actually took effect: torch must report a cuda build- // (torch.version.cuda is set by the wheel itself, independent of whether- // an NVIDIA driver/GPU is present on this machine)+ // verify the swap actually took effect: torch must report the expected+ // build (torch.version.cuda for cu121, torch.version.hip for rocm —+ // set by the wheel itself, independent of whether a working+ // driver/GPU is present on this machine)const swapped = await runCapture(venvPython(),- ['-c', 'import torch;print(1 if torch.version.cuda else 0)'],+ [+ '-c',+ vendor === 'amd'+ ? 'import torch;print(1 if torch.version.hip else 0)'+ : 'import torch;print(1 if torch.version.cuda else 0)'+ ],30000).catch(() => '0')if (!swapped.trim().startsWith('1')) {- throw new Error('cuda torch is not active after install (torch.version.cuda unset)')+ throw new Error(+ vendor === 'amd'+ ? 'rocm torch is not active after install (torch.version.hip unset)'+ : 'cuda torch is not active after install (torch.version.cuda unset)'+ )+ }+ if (vendor === 'amd') {+ // consumer RDNA cards are not official wheel targets; probe the gfx+ // target, apply the HSA override when needed, then prove the GPU+ // with a real compute op before declaring the engine ready — a+ // missing kernel image would otherwise surface mid-separation as a+ // cryptic HIP error+ const gfxOut = await runCapture(+ venvPython(),+ [+ '-c',+ 'import torch;p=torch.cuda.get_device_properties(0);print(getattr(p,"gcnArchName","") or "gfx%d%02d" % (p.major, p.minor))'+ ],+ 30000+ ).catch(() => '')+ const override = gfxOverride(gfxOut)+ if (override) {+ // every python spawn inherits process.env, so one assignment+ // covers the separation runs too; persist it for future launches+ process.env.HSA_OVERRIDE_GFX_VERSION = override+ try {+ writeFileSync(gpuOverrideFile(), override)+ } catch {}+ } else {+ // stale override from an earlier card/engine would shadow the+ // officially supported target+ try {+ unlinkSync(gpuOverrideFile())+ } catch {}+ }+ try {+ const ok = await runCapture(+ venvPython(),+ ['-c', 'import torch;torch.randn(256,256,device="cuda").sum().item();print("ok")'],+ 60000+ )+ if (!ok.trim().includes('ok')) throw new Error('compute probe returned no result')+ } catch (err) {+ throw new Error(+ `AMD GPU probe failed${override ? ` (using ${override})` : ''}: ${+ err instanceof Error ? err.message : String(err)+ }. Check the amdgpu driver and that your user can access /dev/kfd and /dev/dri`+ )+ }}- // refresh the cached cuda probe so Settings' status lines update+ // refresh the cached gpu probe so Settings' status lines updategpuProbe = nullgpuInfo = undefinedvoid hasGpuAcceleration()- sendEnvEvent('GPU engine ready', 'success')+ sendEnvEvent(`${label} GPU engine ready`, 'success')return true})().catch((err) => {diff --git a/src/main/index.ts b/src/main/index.tsindex be26902..7a85de1 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -12,8 +12,9 @@ import {ensureVocalsEngine,ensureFtWeights,ensureGpuEngine,- detectNvidiaGpu,- nvidiaGpuInfo,+ detectGpuVendor,+ gpuVendorInfo,+ applyGpuOverride,hasGpuAcceleration,gpuAccelerationInfo,engineStatus,@@ -134,18 +135,21 @@ app.whenReady().then(async () => {const settings = loadSettings()if (settings.roformerVocals) void ensureVocalsEngine()if (settings.htdemucsFt) void ensureFtWeights()- if (settings.gpuSplit) void ensureGpuEngine(undefined, true)+ if (settings.gpuSplit) void detectGpuVendor().then((vendor) => ensureGpuEngine(undefined, vendor))// warm the informational GPU probe so Settings can show it right awayvoid hasGpuAcceleration()}ipcMain.handle('env:status', async () => {- await detectTools()- void detectNvidiaGpu()+ // restore the AMD ROCm override saved by a previous session's preflight+ // before any python (venv probes, separation runs) can spawn+ applyGpuOverride()+ await detectTools()+ void detectGpuVendor()const status = {...getStatus(),gpu: gpuAccelerationInfo(),- nvidiaGpu: nvidiaGpuInfo()+ gpuVendor: gpuVendorInfo()}// the probe results land on a later status call; never blocks readyif (status.ready) void hasGpuAcceleration()diff --git a/src/main/pipeline.ts b/src/main/pipeline.tsindex 027bf7f..b21238a 100644--- a/src/main/pipeline.ts+++ b/src/main/pipeline.ts@@ -13,6 +13,7 @@ import {ensureVocalsEngine,ensureFtWeights,ensureGpuEngine,+ detectGpuVendor,getStatus,ytDlpRuntimeArgs} from './env'@@ -395,13 +396,13 @@ async function runSeparation(const release = await acquireSeparation()try {if (job.cancelled || !jobs.has(videoId)) throw new Error('cancelled')- // self-heal the GPU engine: the toggle may be on before the CUDA torch+ // self-heal the GPU engine: the toggle may be on before the GPU torch// download has run (fresh setting, or a failed earlier attempt)if (useGpu) {if (!(await ensureGpuEngine((pct) => progress(job, 'separate', 0, `Downloading GPU engine: ${pct}%`),- true+ await detectGpuVendor()))) {bail('Could not prepare the GPU engine — switch back to CPU in Settings and try again')diff --git a/src/main/smoke.ts b/src/main/smoke.tsindex 19ebe90..66e53da 100644--- a/src/main/smoke.ts+++ b/src/main/smoke.ts@@ -14,7 +14,8 @@ import {bundledFfmpeg,ensureEngineDeps,ensureGpuEngine,- detectNvidiaGpu+ detectNvidiaGpu,+ detectAmdGpu} from './env'/* self-test mode, driven by STEMKIT_SMOKE=1 (used by the windows-smoke CI@@ -216,12 +217,14 @@ export async function runSmoke(): Promise<boolean> {log('roformer vocals ok')// GPU plumbing: --device cuda must fail fast with the friendly message- // on the default cpu torch (before any big downloads). After the CUDA+ // on the default cpu torch (before any big downloads). After the GPU// wheel swap, a GPU-less runner expects torch.cuda.is_available() to// stay false, while an NVIDIA machine runs real cuda separations// through both enginesconst nvidia = await detectNvidiaGpu()log(`nvidia gpu detected: ${nvidia}`)+ const amd = await detectAmdGpu()+ log(`amd gpu detected: ${amd}`)if (!(await expectCudaFailure('cuda on cpu torch', [@@ -238,7 +241,10 @@ export async function runSmoke(): Promise<boolean> {if (process.env.STEMKIT_SMOKE_SKIP_GPU === '1') {log('skipping GPU engine install (STEMKIT_SMOKE_SKIP_GPU=1)')} else {- if (!(await ensureGpuEngine((pct) => log(`gpu engine install: ${pct}%`)))) {+ // force the CUDA wheel swap even without a detected NVIDIA card: the+ // GPU-less runner assertion below expects torch.version.cuda to be set+ // while cuda.is_available() stays false+ if (!(await ensureGpuEngine((pct) => log(`gpu engine install: ${pct}%`), 'nvidia', true))) {log('FAIL: GPU engine (cuda torch) did not install')return false}diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsxindex 06b5335..e106542 100644--- a/src/renderer/src/App.tsx+++ b/src/renderer/src/App.tsx@@ -286,7 +286,7 @@ export default function App(): React.ReactElement {<Settingssettings={settings}gpu={status.gpu}- nvidiaGpu={status.nvidiaGpu}+ gpuVendor={status.gpuVendor}onChange={(patch) => void window.stemkit.setSettings(patch)}onClose={() => setSettingsOpen(false)}/>diff --git a/src/renderer/src/components/Settings.tsx b/src/renderer/src/components/Settings.tsxindex 796654a..a82486c 100644--- a/src/renderer/src/components/Settings.tsx+++ b/src/renderer/src/components/Settings.tsx@@ -1,11 +1,11 @@import { useEffect, useState } from 'react'-import type { AppSettings, EngineStatus } from '../../../shared/types'+import type { AppSettings, EngineStatus, GpuVendor } from '../../../shared/types'import { XIcon } from './Icons'interface Props {settings: AppSettingsgpu?: boolean- nvidiaGpu?: boolean+ gpuVendor?: GpuVendoronChange: (patch: Partial<AppSettings>) => voidonClose: () => void}@@ -108,7 +108,7 @@ function SectionHeader({ label }: { label: string }): React.ReactElement {)}-export function Settings({ settings, gpu, nvidiaGpu, onChange, onClose }: Props): React.ReactElement {+export function Settings({ settings, gpu, gpuVendor, onChange, onClose }: Props): React.ReactElement {const [engines, setEngines] = useState<EngineStatus | null>(null)const [vocalsPct, setVocalsPct] = useState<number | null>(null)const [ftPct, setFtPct] = useState<number | null>(null)@@ -181,7 +181,7 @@ export function Settings({ settings, gpu, nvidiaGpu, onChange, onClose }: Props)const gpuLine =gpu === true? 'Uses your GPU — fast'- : gpu === false && nvidiaGpu+ : gpu === false && gpuVendor? 'Running on CPU — enable GPU acceleration below for much faster splits': gpu === false? 'No GPU found — expect ~20-35 min per song on CPU'@@ -194,7 +194,7 @@ export function Settings({ settings, gpu, nvidiaGpu, onChange, onClose }: Props)!!engines && settings.roformerVocals && !engines.vocalsReady && !vocalsBusyconst showFtConfirm = !!engines && settings.htdemucsFt && !engines.ftVerified && !ftBusyconst showGpuConfirm =- !!engines && settings.gpuSplit && nvidiaGpu && !engines.gpuReady && !gpuBusy+ !!engines && settings.gpuSplit && !!gpuVendor && !engines.gpuReady && !gpuBusyconst startVocals = (): void => {setVocalsStarting(true)@@ -260,12 +260,14 @@ export function Settings({ settings, gpu, nvidiaGpu, onChange, onClose }: Props)/></div>- {nvidiaGpu && (+ {gpuVendor && (<div className="flex items-start justify-between gap-4"><div className="min-w-0"><p className="text-[13px] font-medium">GPU acceleration</p><p className="text-[11.5px] text-white/40 leading-relaxed mt-0.5">- Use your NVIDIA GPU for much faster splits.+ {gpuVendor === 'amd'+ ? 'Use your AMD GPU for much faster splits. Experimental — depends on your hardware.'+ : 'Use your NVIDIA GPU for much faster splits.'}</p><DownloadBar pct={gpuPct} starting={gpuBusy && gpuPct === null} error={gpuError} />{showGpuConfirm && (diff --git a/src/shared/types.ts b/src/shared/types.tsindex fda4534..961d728 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -1,5 +1,9 @@export type StemId = 'vocals' | 'drums' | 'bass' | 'other' | 'piano' | 'guitar'+// which GPU vendor GPU acceleration targets: NVIDIA via CUDA torch (windows+// + linux), AMD via ROCm torch (linux only)+export type GpuVendor = 'nvidia' | 'amd'+export const DEFAULT_STEMS: string[] = ['vocals', 'drums', 'bass', 'other']// roformer_hybrid = mel-band roformer vocals + htdemucs drums/bass/other@@ -22,9 +26,10 @@ export interface AppSettings {shifts: 1 | 2htdemucsFt: booleanroformerVocals: boolean- // windows/linux + nvidia: separate on the GPU instead of the CPU. The toggle is- // only rendered when an NVIDIA GPU is detected; enabling it downloads the- // CUDA build of torch (~2.5GB) on first use+ // windows/linux: separate on the GPU instead of the CPU. The toggle is only+ // rendered when an NVIDIA GPU (cuda torch) or an AMD GPU on linux (rocm+ // torch) is detected; enabling it downloads the ~2.5GB GPU build of torch+ // on first usegpuSplit: boolean// hide the YouTube video while playing: stems are always played locally,// this stops streaming the video and falls back to cached thumbnails@@ -44,7 +49,7 @@ export interface EngineStatus {vocalsReady: booleanftDownloading: booleanftVerified: boolean- // cuda torch engine (windows/linux + nvidia only)+ // gpu torch engine (windows/linux; cuda for nvidia, rocm for amd on linux)gpuDownloading: booleangpuReady: boolean}@@ -56,8 +61,9 @@ export interface EnvStatus {bootstrapping: booleanupdating: booleangpu?: boolean- // windows/linux only: an NVIDIA GPU was detected (gates the GPU toggle in Settings)- nvidiaGpu?: boolean+ // windows/linux only: which GPU vendor was detected (gates the GPU toggle+ // in Settings; amd is only detected on linux)+ gpuVendor?: GpuVendor}export interface EnvEvent {