Add Windows AI developer setup workloads - #98
Michael Von Hippel (Kixantrix) wants to merge 13 commits into
Conversation
5cc360d to
cdfa20f
Compare
Add independent CUDA, Foundry Local, PyTorch, llama.cpp, and Ollama flows with architecture-aware installation, model-free smoke tests, shared decision helpers, unit coverage, and documentation. Co-authored-by: Copilot App <[email protected]>
Support CUDA and GPU-backed PyTorch on RTX Spark ARM64, resolve current llama.cpp ARM64 assets, and make every AI flow run an end-to-end kernel or model inference by default. Co-authored-by: Copilot App <[email protected]>
cdfa20f to
c008a17
Compare
Retry locked installer cleanup without masking results, harden ARM64 MSVC discovery, and update llama.cpp b10867 inference arguments and diagnostics. Co-authored-by: Copilot App <[email protected]>
Use the verified Build Tools bootstrapper in modify mode, wait for installer completion, and require the architecture-native compiler before CUDA or Triton setup continues. Co-authored-by: Copilot App <[email protected]>
Put the Visual Studio Installer directory on the child command PATH so VsDevCmd can resolve its bundled vswhere.exe under hardened executable lookup policies. Co-authored-by: Copilot App <[email protected]>
Validate exact installed package versions before pip work, cache the pinned ARM64 wheel after one verified download, and keep tensor and Triton readiness probes on every run. Co-authored-by: Copilot App <[email protected]>
Replace AI DSC acquisition with PR microsoft#93-style PowerShell setup, add AMD ROCm and Intel AI flows, centralize provider promotion metadata, and emit portable hardware acceptance reports. Co-authored-by: Copilot App <[email protected]>
Distinguish absent, outdated, and current packages; use exact upgrade operations with module-to-CLI fallback; and make package evidence schema-tolerant. Co-authored-by: Copilot App <[email protected]>
Use explicit native command results instead of inherited LASTEXITCODE and make Ollama managed-process cleanup tolerant of empty and already-exited processes. Co-authored-by: Copilot App <[email protected]>
Parse llama benchmark JSON after diagnostic prefixes, retain raw backend diagnostics, normalize Foundry cache paths, and force UTF-8 standalone capture. Co-authored-by: Copilot App <[email protected]>
Add exhaustive supported-cell resolution, vendor-native llama.cpp backends, self-contained PyTorch ROCm/XPU paths, deterministic adapter selection, and strict hardware evidence reporting. Co-authored-by: Copilot App <[email protected]>
Add a self-contained plan/apply/report workflow, complete vendor assignments, evidence return criteria, and final N1X Ollama acceptance. Co-authored-by: Copilot App <[email protected]>
Qualcomm ARM64 physical validation statusConditional pass on physical device Final physical results
Findings and local fixes
The complete local evidence bundle contains inventory, plans, final reports, rerun reports, console logs, reboot status, Defender events, prior errors, and the patch. Bundle SHA-256: |
Bound native executions, warm up OpenCL before inference, correct provider and JSON parsing, and pin the policy-approved Qualcomm llama.cpp build. Update partner commands and regression coverage. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0c9c6f4f-4ef5-4ca6-acda-43c5632d325f
|
Update: The locally validated fixes have now been committed and pushed to this PR as |
|
Looking at this from #93's side, since this targets that branch. Two things the workload entry points inherit from its launch contract: The README documents standalone invocation ( Once #93's contract lands, that policy is Have the workload scripts been exercised under |
Summary
winget configureacquisition with PR Add a resumable PowerShell setup flow for Windows developer machines #93-style resumable PowerShell check → apply → verify flowscuda,rocm,intel-ai,foundry,pytorch,llama.cpp, andollamaentry pointsbackendsJSON field plus actualoffloaded X/Y layersdiagnostics; requested-nglis not accepted as hardware proofDependency
Depends on #93 and intentionally targets
user/amelbawa/dev-config-2, notmain.Acquisition and vendor layers
AI workloads no longer contain
configuration.wingetfiles. Their PowerShell entry points reuse the Windows Dev Config WinGet, retry, PATH, elevation, and bounded-process contracts throughsrc/Workloads/_common/direct-setup.ps1.CPU architecture and GPU vendor are independent axes. ARM64 is not a GPU vendor: the validated N1X host is Windows ARM64 with NVIDIA RTX Spark. AMD ROCm and Intel XPU/oneAPI currently publish native Windows x64 artifacts only.
cudauses exact WinGet IDNvidia.CUDA: the shared PowerShell helper skips a current package, runs exactwinget upgradewhen outdated, or exactwinget installwhen absent. Visual Studio Build Tools and native MSVC are ensured separately through WinGet.cu126orcu130wheel selected from driver/device capability into a contained venv. The wheel carries its tensor runtime; standalone CUDA/MSVC is acquired only when compatible Triton JIT needs compilation.%LOCALAPPDATA%\DevConfig\llama.cpp\runtime.cudadownloads NVIDIAcuda_13.4.0_windows_arm64.exedirectly (not through WinGet), caches it at%ProgramData%\WindowsDeveloperConfig\cache\nvidia-cuda\13.4.0, verifies pinned SHA-256a1f68c81160b16d519c4087788b9c07de41306c3f1b872471ceee0996621374dand the NVIDIA Authenticode signer, then silently installs CUDA v13.4. Visual Studio Build Tools/MSVC still use the exact WinGet package flow.%LOCALAPPDATA%\DevConfig\pytorch\wheel-cache, verifies its SHA-256, and installs it into the contained venv. CUDA/MSVC is ensured when Triton JIT is enabled.rocminstalls the exactrocm[libraries,devel,device-<gfx>]==10.0.0tuple from AMD's stable Windows feed into%LOCALAPPDATA%\DevConfig\rocm\.venv; the detected supported GPU name selects<gfx>. Wheel RECORD metadata is retained, thenhipcccompiles and executes a HIP kernel.torch[device-<gfx>], matchingtorchvision, andtorchaudioROCm 10 tuple from the AMD feed into%LOCALAPPDATA%\DevConfig\pytorch\.venv. The nativerocmSDK flow is not a prerequisite for tensor inference.llama-bNNNNN-bin-win-rocm-10.0-x64.zipfrom the newest complete ggml-org release, verifies its GitHub SHA-256 digest, and atomically installs the resolver-owned runtime.intel-ai -Profile OpenVINOinstalls the pinned OpenVINO 2026.3.1 Python tuple into%LOCALAPPDATA%\DevConfig\intel-ai\openvino\.venv.-Profile SYCLorFulladditionally ensures exact WinGet IDIntel.OneAPI.Toolkitfor native SYCL development.torch==2.14.0+xpu,torchvision==0.29.0+xpu, andtriton-xpu==3.8.0from the official PyTorch XPU index into%LOCALAPPDATA%\DevConfig\pytorch\.venv; full oneAPI is not required.Microsoft.FoundryLocal; its WinML provider layer controls acceleration and the report records the actual EP or CPU fallback.llama-bNNNNN-bin-win-opencl-adreno-arm64.ziponly when an Adreno adapter and OpenCL loader are detected, verifies its GitHub digest, and atomically installs the runtime.Every flow inventories the host, resolves a supported provider, supports
-PlanOnly, checks current state, installs/upgrades only the selected stack, executes a real workload, and writes a report conforming tosrc/docs/ai-workload-report.schema.json.GPU drivers are validated prerequisites and are not installed or replaced by these flows.
Quick installation mechanics
Nvidia.CUDA; ARM64 uses the pinned and Authenticode-verified NVIDIA 13.4 preview EXE described above. Both ensure architecture-native MSVC.nvcccompiles and executessmoke.cuon the selected NVIDIA GPU.%LOCALAPPDATA%\DevConfig\rocm\.venv.hipcccompiles and executes a HIP kernel; report includes AMD device andgfxtarget.%LOCALAPPDATA%\DevConfig\intel-ai\openvino\.venv; optional native SYCL uses WinGetIntel.OneAPI.Toolkit.Microsoft.FoundryLocal; skip/upgrade/install behavior uses the shared package helper. The application is installed as an architecture-native per-user MSIX; models use the Foundry-managed cache.qwen3-0.6b, runs real inference, and reports the actual execution provider, including truthful CPU fallback.Python.Python.3.13, then a contained venv under%LOCALAPPDATA%\DevConfig\pytorch\.venv. CPU/CUDA use official PyTorch indexes except the pinned ARM64 CUDA wheel; AMD uses the stable ROCm feed; Intel uses the official XPU index.triton-windows==3.8.0.post28; Intel uses official XPU packagetriton-xpu==3.8.0. Both install inside the PyTorch venv. Native Windows AMD Triton is unavailable.torch.compileexecutes on the selected GPU.%LOCALAPPDATA%\DevConfig\llama.cpp\runtime.llama-benchproves backend, physical device, and offloaded GPU layers.Ollama.Ollama; ARM64 downloads the latest officialollama-windows-arm64.zip, verifies the GitHub digest, and atomically installs under%LOCALAPPDATA%\DevConfig\ollama\runtime. Models remain in the Ollama-managed model store.Hardware matrix
Nvidia.CUDA: skip when current, exactwinget upgradewhen outdated, exactwinget installwhen absent; ensure Visual Studio Build Tools/native MSVC separatelycuda_13.4.0_windows_arm64.exe(not WinGet); cache under%ProgramData%\WindowsDeveloperConfig\cache\nvidia-cuda\13.4.0; verify pinned SHA-256 + NVIDIA Authenticode; silently install CUDA v13.4; ensure ARM64 MSVC through WinGetnvcc, compilesmoke.cu, and execute it on the selected NVIDIA GPUdevice-<gfx>tupletorch.version.hip, AMD device name/gfx target, and tensor on the AMD GPUtorch.xpu.is_available(), Intel device tensor, and coldtorch.compilethroughtriton-xputriton-windowson qualified CUDA stackstriton-xpuintegrationtorch.compileexecution on Intel XPUllama-benchidentifies CUDA/NVIDIA device and GPU layers; pinned GGUF inference passes/api/psbackend/VRAM evidencePyTorch
-Backend Autopriority is supported NVIDIA CUDA → supported AMD ROCm → supported Intel XPU → CPU. llama.cpp-Backend Autopriority is supported NVIDIA CUDA → supported AMD ROCm → supported Intel SYCL → Qualcomm Adreno OpenCL → x64 Vulkan → CPU. Explicit selections target secondary adapters and fail actionably when incompatible.Known vendor gaps and boundaries
CPUExecutionProviderbecause CUDA EP registration was unavailable. Drivers are qualified but not replaced.triton-xpu, llama.cpp SYCL/OpenVINOAuto priority is deterministic and an explicit backend can select a supported secondary vendor. Same-vendor targeting is exposed through CUDA/ROCm and explicit-backend PyTorch
-DeviceIndex, llama.cpp-Device, OpenVINO-OpenVinoDeviceId, and oneAPI-SyclDeviceSelector. PyTorch Auto intentionally requires index 0. Foundry and Ollama are source-managed and report actual device/allocation rather than claiming a selector. GPU drivers are reportable preconditions; flows fail with remediation but do not replace them.Code path readiness before hardware testing
Nvidia.CUDA+ native MSVCtorch.compileai-catalog.psd1::CapabilityMatrixis executable: the shared test invokes every implemented/source-managed resolver fixture and checks acquisition metadata, probe existence, report contract, and partner command. Upstream-unavailable cells are the only non-implemented cells and return cataloged actionable blockers.Current → stable acquisition and promotion report
Metadata is centralized in
src/Workloads/_common/ai-catalog.psd1; moving a qualified preview/rolling provider to a normal channel is a resolver/data change.Nvidia.CUDA%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v*Nvidia.CUDAcuda_13.4.0_windows_arm64.exe, SHA-256a1f68c...1374d%ProgramData%\WindowsDeveloperConfig\cache\nvidia-cuda\13.4.0Nvidia.CUDAARM64 — unconfirmedcu126/cu130indexes,torch==2.14.0+cu*torch-2.15.0.dev20260904+cu134-cp313-cp313-win_arm64.whl, SHA-256af0872...65d3%LOCALAPPDATA%\DevConfig\pytorch\wheel-cachewin_arm64CUDAtorch[device-<gfx>]==2.13.0+rocm10.0.0,torchvision[device-<gfx>]==0.28.0+rocm10.0.0,torchaudio==2.11.0.2+rocm10.0.0torch==2.14.0+xpu,torchvision==0.29.0+xputriton-windows==3.8.0.post28triton-xpu==3.8.0bNNNNNrelease:llama-bNNNNN-bin-win-cuda-13.3-x64.zip+ matching cudart, or CUDA 12.4 pair%LOCALAPPDATA%\DevConfig\llama.cpp\asset-cache\<tag>ggml.llamacppCUDA — unconfirmedllama-bNNNNN-bin-win-rocm-10.0-x64.zip...-win-sycl-x64.zipor...-win-openvino-2026.3.1-x64.zip...-win-opencl-adreno-arm64.zip...-win-vulkan-x64.zip...-win-cpu-x64.zipor...-win-cpu-arm64.zipMicrosoft.FoundryLocalollama-windows-arm64.zip%LOCALAPPDATA%\DevConfig\ollama\runtimerocm[libraries,devel,device-<gfx>]==10.0.0Intel.OneAPI.ToolkitReal-hardware acceptance
Validated on Windows 11 ARM64 build 28120, NVIDIA RTX Spark N1X, driver 616.62, CUDA UMD 13.4, compute capability 12.1:
Hostarm64\arm64\cl.exe; CUDA 13.4 preview current;nvccV13.4.46smoke.cuon N1Xtriton-windows 3.8.0.post28CPUExecutionProvider; failed optional WebGPU/NvTensorRT registrations retainedggml-cuda.dll; N1X CC12.1; CUDA; 999 GPU layers; prompt 2836.65 t/s; generation 127.34 t/s; real inferencehttp://127.0.0.1:65364/api/psreports 100% GPUCUDA and PyTorch ARM64 remain developer previews; this qualifies the tested N1X configuration and is not a production-support claim. The current llama resolver preserves the same official b10883 CUDA 13.4 pair and acceptance logic, adds explicit
-ngl 999, cache/digest metadata, and atomic installation; no expensive N1X model rerun was performed for this resolver-only update.Lightweight acceptance was rerun after adding explicit adapter selection: the
indexed CUDA kernel executed on device 0
NVIDIA RTX Spark N1X (5120-core Blackwell RTX GPU), the indexed PyTorch CUDAtensor reported torch
2.15.0.dev20260904+cu134/ CUDA 13.4 / NumPy 2.5.2,and indexed Triton vector-add JIT executed on the same device. The reusable
llama probe reran inference plus verbose benchmark validation, read the official
backends=CUDAandgpu_infofields, and parsedoffloaded 29/29 layers to GPU. The final elevated ARM64 Ollama acceptance launched runtime0.34.0onresolver-owned
http://127.0.0.1:65364, verified theqwen3:0.6bdigest,completed real inference, and reported 100% GPU through
/api/ps. A liveFoundry report probe selected
CPUExecutionProvider, marked truthful CPUfallback, and retained WebGPU/NvTensorRT/CUDA providers only as observed
registration attempts. The final Ollama report and console log were retained
as
n1x-final-ollama.jsonandn1x-final-ollama.log.Partner commands and remaining hardware gaps
Checkout the qualified PR head:
The workload implementation was qualified at
ec7fc5e; later commits may bedocumentation-only. Always use the live PR head selected above.
Git-only fallback:
Open elevated PowerShell in the repository root:
Foundry is source-managed: Qualcomm validation records the actual EP/fallback
and does not require accelerator selection. Return the entire
$ReportRootdirectory plus reboot requested/performed status.
Success is not
INSTALL_OK. Each final report must haveresult.ready=true, no blockers, and acceptance evidence for the intendeddevice/backend.
torch.compilebackends,gpu_info, actual offloaded layers, model hash/markerfallbackUsed; CPU is valid when truthfulgpuFractionwhen acceleratedresult.ready, all warnings/blockers, plan/final console logs, reboot statusRemaining live gaps are AMD x64 PyTorch ROCm + native HIP + llama ROCm, Intel x64 PyTorch XPU/compile + OpenVINO/SYCL + llama SYCL/OpenVINO, NVIDIA x64 llama CUDA 13.3/12.4, and Qualcomm ARM64 llama OpenCL/Adreno.
Validation
-PlanOnlyflows complete and reports validate against the checked-in JSON schemagit diff --checkpassesHardware-dependent flows remain
manual_testin hosted CI.