logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·02.11.26
← Back to news

CUDA for AMD on Windows

Original article
github.com|73 points|22 comments|by chiassedu80|Sep 13, 2026

Windows AMD verify

CUDA for AMD on Windows

This project provides a method to execute Windows applications designed for NVIDIA CUDA on AMD hardware by leveraging ZLUDA in conjunction with ROCm/HIP. It is specifically tailored for compute-heavy workloads, including those utilizing CUDA-enabled LibTorch.

[!IMPORTANT] Hardware Compatibility: Currently, the only fully validated hardware is the AMD Radeon RX 9060 XT (architecture gfx1200). While other AMD GPUs may work, they are considered "candidates" and are not guaranteed. Please submit a GPU compatibility report if you test other cards.

🛠️ Technical Validation

As of the latest update, the public upstream path has been verified using the following stack:

  • ZLUDA: v6-preview.69 (Official release)
  • AMD HIP SDK: 6.4
  • LibTorch: 2.3.0 + cu118
  • Hardware: RX 9060 XT / gfx1200

Integration Results

The following components passed the cuda_check utility: nvcuda, cuBLAS, cuBLASLt, cuSPARSE, and cuFFT.

Furthermore, a real-world PPO network consisting of ≈2,216,347\approx 2,216,347≈2,216,347 parameters successfully completed:

  1. Forward pass/inference.
  2. PPO learning and optimizer functions.
  3. A full validation iteration of 65,53665,53665,536 timesteps.

⚙️ How it Works

The system acts as a translation layer, redirecting CUDA calls to AMD-compatible libraries.

🚀 Installation Guide

Step 1: Prerequisites

  • Install the latest AMD GPU Driver.
  • Install the AMD HIP SDK for Windows (including HIP Libraries).
    • Note: Versions newer than 6.4 may work but are unverified.
    • Official AMD Windows HIP SDK Guide

Step 2: Setup the Environment

Clone the repository and execute the installation script via PowerShell:

git clone https://github.com/Speedstu/CUDA-for-AMD-Windows.git
cd CUDA-for-AMD-Windows
powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1

The install.ps1 script performs the following:

  • Detects the native gfxXXXX target and AMD GPU.
  • Validates the HIP SDK and necessary math libraries.
  • Fetches the pinned official ZLUDA build.
  • Downloads LibTorch 2.3.0+cu118 (≈2.66 GB\approx 2.66\text{ GB}≈2.66 GB).
  • Verifies files via SHA-256 hashes.
  • Creates .runtime\runtime-config.json and .runtime\gpu-report.json.
  • Runs cuda_check.exe to verify the stack.

Tip: If LibTorch is not required for your application, use: .\scripts\install.ps1 -SkipLibTorch

🏃 Running Applications

To launch a CUDA-targeted program:

.\scripts\run-zluda.ps1 -Program "C:\path\to\app.exe"

This launcher places the necessary ZLUDA DLLs alongside the executable and configures the HIP/ROCm runtime paths.

Alternative Options:

  • Manual Staging: .\scripts\stage-runtime.ps1 -TargetDir "C:\path\to\your-app"
  • Diagnostics:
    • .\scripts\doctor.ps1
    • .\scripts\gpu-scan.ps1 (Logs GPU model, architecture, and driver info; does not collect personal data).
    • .\scripts\test-runtime.ps1

📊 Compatibility & Performance

Hardware Status

GPU ModelTargetStatus
Radeon RX 9060 XTgfx1200✅ Validated Reference
Other HIP GPUsVarious⚠️ Unverified Candidates

Runtime Coverage

CUDA ComponentResultImplementation
nvcuda (Driver)✅Native
cuBLAS✅via rocBLAS
cuBLASLt✅via hipBLASLt
cuSPARSE✅via rocSPARSE
cuFFT✅Native
cuDNN⚠️Unavailable in stable Windows HIP SDK

Note: Software requiring heavy convolution (cuDNN) may need a nightly HIP stack. However, GEMM-heavy LibTorch training (like the PPO workload) functions without it.

Performance Benchmarks

A controlled A/B test was conducted on 2026-09-13 using the RX 9060 XT (10 iterations, first iteration discarded as warmup).

Runtime PathMedian Overall SPS
Public Upstream13,27813,27813,278
Custom Overlay12,87612,87612,876

The public upstream path was approximately 3.03%3.03\%3.03% faster than the custom overlay. Historical tuned runs have reached between 70k70\text{k}70k and 109k109\text{k}109k steps/s.

📜 Additional Notes

Custom Overlay: The project previously experimented with a custom cuBLAS/HIP overlay. This is not required for the validated path and is slower for the reference workload. These artifacts are fingerprinted in manifests/recovered-artifacts.sha256 but are not provided as binaries due to incomplete provenance and the inclusion of third-party AMD binaries.

Repository Structure:

  • scripts/: Contains install.ps1, run-zluda.ps1, etc.
  • manifests/: SHA-256 fingerprints.
  • docs/, examples/, benchmarks/: Supporting materials.