hardware//GPU//ROCm
ROCm is AMD's software platform for general-purpose computing on its GPUs (drivers, a compiler, math libraries and the HIP programming language), and it is what lets machine learning frameworks such as PyTorch run on AMD hardware the way CUDA lets them run on NVIDIA's. HIP is written to mirror CUDA almost call for call, so most CUDA code can be translated to it mechanically, and the ROCm build of PyTorch even keeps CUDA's names: on an AMD card, `torch.cuda.is_available()` returns true and `device="cuda"` means the AMD GPU.
ROCm is AMD's software platform for general-purpose computing on its GPUs (drivers, a compiler, math libraries and the HIP programming language), and it is what lets machine learning frameworks such as PyTorch run on AMD hardware the way CUDA lets them run on NVIDIA's. HIP is written to mirror CUDA almost call for call, so most CUDA code can be translated to it mechanically, and the ROCm build of PyTorch even keeps CUDA's names: on an AMD card, torch.cuda.is_available() returns true and device="cuda" means the AMD GPU.
Support is a list, not a promise. ROCm officially targets AMD's data-centre accelerators and a set of Radeon cards, mostly on Linux; integrated graphics in laptops are usually missing from that list, and Windows support has lagged behind Linux. A machine with an AMD GPU therefore does not imply a working PyTorch on that GPU.
What a GPU can run depends on the software stack as much as on the silicon. An engine that ships its own kernels for a vendor-neutral API, such as the Vulkan backend of llama.cpp, can use an AMD integrated GPU that ROCm does not support.