Does CUDA Work With AMD GPUs? What Actually Runs and What Needs Porting

ROCm, not CUDA, is how AMD GPUs run CUDA workloads: most CUDA code moves over through HIP, but hand-tuned kernels need a real port.

Does CUDA Work With AMD GPUs? What Actually Runs and What Needs Porting
Written by TechnoLynx Published on 11 Jul 2026

CUDA itself does not run on AMD GPUs. CUDA is NVIDIA’s compute platform and programming model (we cover what CUDA stands for and what it is separately), and its toolkit and runtime target NVIDIA hardware. On AMD the equivalent is ROCm, AMD’s software stack for programming its GPUs, which is mostly open source. CUDA code can be moved onto ROCm by converting it to HIP, a C++ dialect designed to make it easier to convert CUDA applications into portable code. For existing PyTorch code and models, the port needs very few code changes, if any. A codebase full of hand-tuned CUDA kernels is a different matter: that is an engineering project, and profiling the serving path before you commit shows where that work lies.

Does CUDA Work with AMD GPUs, or Is It NVIDIA-Only?

The NVIDIA toolkit and the binaries it produces target NVIDIA GPUs only. The code written against it is not necessarily stuck there. Tom’s Hardware describes two ways to run a CUDA program on non-NVIDIA hardware: recompile the source, or run the compiled binaries through a translation layer. Recompiling existing CUDA programs is legal, and AMD provides tools for porting CUDA programs to ROCm. Translation layers are a different story: since CUDA 11.6, the EULA installed with the toolkit forbids reverse engineering, decompiling or disassembling output generated with SDK elements in order to translate it for a non-NVIDIA platform.

So in a production context, the practical answer to “can AMD run CUDA” means “can our CUDA source be rebuilt for ROCm, and at what cost”.

How ROCm, HIP and HIPIFY Fit Together

Each of these names does a different job:

  • ROCm is the whole stack. It supplies the compilers, high-level libraries, debuggers, profilers and runtimes for HIP, OpenCL and OpenMP.
  • HIP is AMD’s GPU programming language extension and runtime. Its runtime API closely mirrors CUDA’s, which is what makes porting tractable. It was designed to resemble recent versions of the CUDA API, though not necessarily the latest.
  • HIPIFY is the translation tool that converts CUDA source into portable HIP C++.
  • hipcc is the compiler driver, and it calls either Clang or NVCC. With HIP_PLATFORM=nvidia, hipcc hands the code to nvcc, so a single HIP codebase can build for both vendors.

The libraries follow a naming convention that bears on performance. Libraries prefixed roc* are native implementations written in HIP for AMD GPUs. Libraries prefixed hip* are portable wrappers that implement CUDA-equivalent APIs. If you are still deciding which programming model to standardise on, our comparison of CUDA, OpenCL and SYCL as GPU compute APIs sets out that choice.

Can Existing CUDA Code Run on an AMD GPU, and Which Parts Are a Config Change Versus a Real Port?

How much work the move takes depends on how much of your GPU code you wrote yourselves. Framework-level PyTorch code carries over with very few changes. Your own kernels and your third-party CUDA dependencies are where the work is. The table below lays out each layer of a typical inference stack.

What your stack contains What moving to AMD involves What to watch for
PyTorch model code using torch.cuda A ROCm build of PyTorch. PyTorch for HIP deliberately reuses the torch.cuda interfaces, so very few code changes are needed, if any The NVIDIA-only “bfx9” precision mode raises an error on ROCm, and CUDA and HIP version APIs must not be used interchangeably in version checks
vLLM serving vLLM supports AMD GPUs on ROCm 6.3 or above, including MI200, MI300 and Radeon RX 7900 and 9000 series; MI350 needs ROCm 7.0 or above ROCm wheels exist only for Python 3.12. On other versions the installer silently falls back to the CUDA wheel, which then fails on AMD
ONNX Runtime Moving from the ROCm Execution Provider to the MIGraphX Execution Provider, which uses AMD’s graph optimisation engine The ROCm EP was removed in ONNX Runtime 1.23, and ROCm 7.0 is its last officially supported distribution
Calls into CUDA libraries (cuBLAS, cuFFT, cuSPARSE, cuRAND) Most CUDA libraries have a corresponding HIP library CUDA or third-party libraries with no HIP equivalent cannot be translated
Hand-written CUDA kernels HIPIFY translation, then code review, replacement of unsupported constructs, testing and tuning on the AMD target Code optimised for NVIDIA GPUs may need further rework to perform on AMD
Compiled CUDA binaries with no source A translation layer The CUDA 11.6+ EULA clause on translating output for non-NVIDIA platforms

Two further details deserve a closer look. The first is binary compatibility. vLLM compiles many ROCm kernels itself, so its binaries may not work with other ROCm or PyTorch builds, and a different ROCm version means building vLLM from source. The second is versioning across the stack. ROCm depends on firmware, driver and user-space components being kept in step, especially on AMD data-centre products. On AMD, “config change” really means pinning a whole validated stack, not running a single pip install.

A note on Windows support. AMD’s Windows support matrix lists a specific set of Radeon GPUs, and states that although PyTorch on Windows includes ROCm 7.2.1 components, the full ROCm stack is not yet supported there. Production inference on Instinct-class hardware is a Linux question.

How Much Engineering Effort Does Porting Hand-Written CUDA Kernels to HIP Actually Take?

AMD’s own estimate, from HPC applications ported with HIP, is anywhere from a few hours to a few weeks, depending largely on how complex the original source is. That range is honest, but it is not much use for planning until you know what drives a codebase towards the long end. AMD’s translation tools significantly speed up the mechanical translation. One Frontier team, for example, ported its application by converting all its CUDA code with hipify and writing adapters to libraries such as rocBLAS. The manual work lies in what the tools cannot convert:

  • Hardcoded warp size. AMD architectures have different warp sizes, and GCN/CDNA uses 64. Code that assumes 32, or keeps lane masks in 32-bit integers, breaks quietly. hipify does not run the application, so hardcoded values like a warp size of 32 have to be changed by hand.
  • Inline PTX, CUDA intrinsics and register limits. AMD’s porting guidance tells you to check for inline PTX assembly, CUDA intrinsics, hardcoded dependencies and code that limits register file size on NVIDIA hardware. amdclang++ does not support --maxregcount, and the __launch_bounds__ second parameter changes meaning, from minimum blocks per multiprocessor to minimum warps per execution unit.
  • Missing CUDA features. HIP is not a complete replacement for CUDA. The Ginkgo team found that HIP lacked subwarp cooperative groups with shuffle and vote operations, and wrote their own. The Frontier readiness report warns that HIP’s similarity to CUDA can lead developers to wrongly assume every feature of the latest CUDA version is available.
  • Memory model assumptions. One Frontier application had to stop using unified virtual memory to get better performance on the AMD platform.
  • Build systems. The hipify tools do not convert build scripts, so flags and paths have to be set up by hand.
  • Tool choice. hipify-perl works by pattern matching and is easier to set up. hipify-clang parses the code properly but needs CUDA code that compiles and a working CUDA install. AMD lists macro expansion, namespaces, some templates and complex argument lists among the constructs hipify-perl cannot yet transform.

Published measurements put the cost of the HIP layer itself as small, but check what they measure. A Frontier readiness study found HIP performance averaged 99.8% of CUDA performance including data transfer costs. That comparison ran HIP compiled for NVIDIA GPUs, where the HIP programs are CUDA executables once built. Ginkgo’s developers (Tsai et al.) likewise compared HIP and CUDA on an NVIDIA V100. Across more than 2,800 test matrices, half the cases differed by less than 3% and 90% by less than 10%. These results show that the HIP layer itself adds little overhead on average. They do not tell you that an AMD GPU will match your NVIDIA latency. That depends on AMD’s software stack, including compiler and kernel maturity.

A HIP port also avoids duplicating code when the result is a single source tree. Ginkgo put shared kernels in a common folder and kept only backend-specific settings such as warp size and launch bounds separate. Roughly a third of its code base is shared between the CUDA and HIP executors. We go further into structuring a HIP port of a GPU inference path off CUDA lock-in, and into what cross-platform GPU performance portability actually requires beyond getting the code to compile.

Are There Tools That Run Existing CUDA Source on AMD GPUs Without Rewriting It to HIP, and Are They Production-Ready?

Yes: SCALE and ZLUDA, which need to be judged differently from ROCm. SCALE, from Spectral Compute, describes itself as a CUDA-compatible toolkit that compiles existing CUDA codebases for AMD GPUs with zero code changes. According to Spectral Compute, it provides a drop-in replacement for nvcc, its own implementation of the CUDA runtime, driver and math APIs for AMD, and wrapper libraries that delegate CUDA-X calls to ROCm libraries. Spectral Compute also claims its implementations are often faster than HIP. That claim comes from the vendor’s own documentation. SCALE’s public validation repository is more useful here: it holds scripts to build and test third-party projects such as PyTorch, vLLM, llama.cpp, FlashInfer and CUTLASS, shows test status for SCALE v1.7.3, and states that some tests are expected to fail because test scripts are added long before the projects are fully supported. Before relying on SCALE, look up your own dependencies’ status in that repository.

ZLUDA works differently, as a drop-in CUDA replacement. Phoronix reports that it was quietly funded by AMD for years as a drop-in CUDA replacement on AMD GPUs. Its recent visible progress has been on PhysX for older games. Tom’s Hardware reads the CUDA 11.6+ EULA clause on translating output as designed to prevent initiatives like ZLUDA.

Our judgement is that neither tool is the default route for a production serving path. Because SCALE has a public test record, we would evaluate it where a HIP port looks expensive and your dependencies pass its validation. ZLUDA’s funding history and its licensing exposure make it a poor base for anything with an SLA. Tom’s Hardware’s own assessment is that programs compiled natively for a processor will work better than software run through translation layers.

How Does ROCm Compare with CUDA in Library and Tooling Maturity for Production GPU Workloads?

AMD’s hardware specifications are strong. The independent measurements below point to its software stack as a main limit on realised performance. Ambati and Diep (arXiv, 2025) found that despite the MI300X having about 1.5x the theoretical compute of the H100, it delivered only 37–66% of H100/H200 performance in realised LLM inference. In the same study, the MI300X sustained on average 45% of its theoretical peak FLOPs across FP8, BF16 and FP16, against up to 93% for NVIDIA’s H100 and B200. The authors attribute the gap mainly to compiler and kernel maturity, and to frequency and power management. Memory told a different story: the MI300X reached about 81% of its 5.3 TB/s peak.

SemiAnalysis reached a similar conclusion in its MI300X training benchmark. On BF16 GEMMs the MI300X was 14% slower than the H100 and H200, even with a custom Docker image built by an AMD principal engineer and a set of non-default environment flags. One of the bugs it documented illustrates the library problem well. F.Linear ran slower than torch.matmul because it still used rocBLAS, while torch.matmul used hipBLASLt, the library better tuned for the MI300X. This is the practical side of AMD’s own advice to prefer the roc* library where both versions exist. SemiAnalysis also found that many of AMD’s AI libraries are forks of NVIDIA’s, causing compatibility issues, and that a weaker RCCL held back MI300X scale-out.

On inference correctness, SemiAnalysis’s later inference benchmark reported that models score worse on various evals on ROCm than on CUDA, due to a lack of CI and of numerically accurate kernels. It also put ROCm SGLang CI coverage at under 10% of NVIDIA’s. The same report credits AMD with adding automated CI tests since its earlier review.

Treat all of these as dated snapshots of a stack that is changing quickly, not as fixed properties of AMD hardware. vLLM’s current documentation already ships ROCm 10.0 wheels. The comparison that counts is your workload on the ROCm version you would actually deploy. For a broader look at the stack gap, our article on what the ROCm vs CUDA software gap means in practice covers the wider ecosystem questions.

How Do I Decide Whether Switching to AMD Is Worth It for Cost-per-Request?

Set a measurable trigger first, then port. A port is worth doing when it addresses a measurable trigger: a performance ceiling, a deployment-target constraint, or a lock-in cost. “Being portable” is not a trigger on its own. The economics are not settled by price alone. SemiAnalysis found the MI300X has a lower total cost of ownership than the H100/H200, yet training performance per unit of TCO was worse on AMD’s public stable software, and that changed only with custom development builds. The MI300X’s higher memory bandwidth (5.3 TB/s against 3.35 TB/s for the H100, per SemiAnalysis) is very useful in inference. We would not assume that advantage survives your serving path until we had measured it.

The measure that settles it is cost per request at the p95 latency you have committed to. Instance price and peak throughput do not settle it. Our article on building a load-aware cost-per-request model defines that KPI, and porting AI inference to cut cost without a model swap puts hardware moves alongside runtime moves as cost levers.

What to Profile Before Committing to an AMD Port

Profiling tells you which kernels dominate latency, and so which parts of the port deserve effort. On the NVIDIA side, profiling GPU kernels to find the real bottleneck goes into the method. On the AMD side, rocprofv3 traces API calls and GPU commands without any change to the source. That gives you the first answers: how much time goes to memory copies, and which kernel runs longest. Before you commit, check:

  1. Where the time goes today. Separate framework and library calls from your own kernels, which need manual review and tuning after HIPIFY.
  2. Whether every dependency has a ROCm path. That means each runtime (MIGraphX, not the removed ROCm EP, for ONNX Runtime) and each CUDA library your kernels call.
  3. p95 latency and throughput on the target GPU, at your real batch sizes and sequence lengths, on the exact ROCm, PyTorch and vLLM versions you would deploy.
  4. Numerical accuracy, with the same evaluation suite you trust on CUDA, since eval regressions on ROCm have been reported. Precision settings also differ: TF32 on MI300 goes through hipBLASLt, and some NVIDIA modes do not exist on ROCm.
  5. Kernel-level hazards in the ported code, such as register spills, which on AMD land in scratch, the rough equivalent of CUDA local memory.
  6. The engineering days needed to close any gap you find, set against the cost difference that justifies the move in the first place.

Who Can Scope a CUDA-to-ROCm Port of Our Inference Stack?

TechnoLynx profiles your current serving path and identifies where CUDA-specific code would block a move to AMD hardware. TechnoLynx then separates what is a rebuild from what is a real port, and estimates the effort against your cost-per-request trigger. The porting and tuning are part of TechnoLynx’s GPU performance engineering work, and the first step is a profiling pass on your existing path. A specialist earns its cost when the kernels are business-critical and the hardware decision has a deadline. Whoever you pick, ask what they will measure on your models and how, not which vendor they prefer.

This engagement is not useful if your stack is pure PyTorch or vLLM with no custom kernels. In that case the framework documentation and a test deployment will answer most of your questions. It is also the wrong fit if what you want is a general hardware recommendation with no workload to measure. Published benchmark results are the better starting point there.

FAQ

Do AMD GPUs Have CUDA Cores?

No. “CUDA core” is NVIDIA’s name for its own shader units. AMD GPUs are built from compute units and are programmed through ROCm and HIP, not CUDA.

How Does OpenCL Relate to CUDA and ROCm?

OpenCL is an open, cross-vendor compute standard, and ROCm ships tools for it alongside HIP and OpenMP. Our explainer on OpenCL for cross-vendor inference compute covers where it fits.