New SCALE tool enables CUDA applications to run on AMD GPUs
By recompiling CUDA programs for AMD GPUs
Spectral Compute has introduced SCALE, a new toolchain that allows CUDA programs to run directly on AMD GPUs without modifications to the code, reports Phoronix. SCALE can automatically compile existing CUDA code for AMD GPUs, which greatly simplifies transition of software originally developed for Nvidia hardware to other platforms without breaking any end user license agreements.
Spectral's SCALE is a toolkit, akin to Nvidia's CUDA Toolkit, designed to generate binaries for non-Nvidia GPUs when compiling CUDA code. It strives for source compatibility with CUDA, including support for unique implementations like inline PTX as, and nvcc's C++ implementation, though it can generate code compatible with AMD's ROCm 6. One of SCALE's significant advantages is its ability to act as a drop-in replacement for Nvidia's own nvcc compiler. Therefore, unlike other projects that translate CUDA code to another language or use other manual steps, SCALE directly compiles CUDA sources for AMD GPUs.
SCALE's implementation leverages some open-source LLVM components to create a solution that is both efficient and user-friendly as the software package aims to offer a more seamless and integrated solution that ZLUDA, which is a translation layer that is prohibited to use. It even mimics the Nvidia CUDA Toolkit runtime, making it easier for developers to port their existing CUDA programs to AMD hardware.
SCALE has undergone extensive testing with a variety of software, including Blender, Llama-cpp, XGboost, FAISS, GOMC, STDGPU, Hashcat, and Nvidia Thrust, and has proven that it works stably and correctly. Testing has been conducted on RDNA 2 and RDNA 3 GPUs, with basic testing on RDNA 1 and ongoing development for Vega support. The developers did not have access to AMD's CDNA-based GPUs though.
The lack of support for CDNA-based processors is a disadvantage of SCALE because datacenter software designed using CUDA and for CUDA-compatible hardware dominates the rapidly growing AI space and many developers are interested in easily porting their programs to competing platforms, expanding their addressable market.
Funding for SCALE has been provided by Spectral Compute's consulting business since 2017, without financial backing from AMD. Although the program is not open source, there is a Free Edition License available and this one can be used for commercial applications.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Anton Shilov is a contributing writer at Tom’s Hardware. Over the past couple of decades, he has covered everything from CPUs and GPUs to supercomputers and from modern process technologies and latest fab tools to high-tech industry trends.
-
Sunilshah-99 I read that great article you posted on ' New "SCALE" Software Allows Natively Compiling CUDA Apps For AMD GPU'S ' https://www.phoronix.com/news/SCALE-CUDA-Apps-For-AMD-GPUsReply
That would be, if indeed true, an incredible positive for AMD's duel against Nvidia's monopoly in AI-GPU's
it reads: "SCALE is a "clean room" implementation of CUDA that leverages some open-source LLVM components while forming a solution to natively compile CUDA sources for AMD GPUs without modification -- a big benefit over alternative projects that only assist in code translation by transpiling to another "portable" language or other manual developer steps being involved. SCALE takes CUDA programs as-is and can even handle CUDA programs relying on line NVPTX Assembly. The SCALE compiler also is a drop-in replacement to NVIDIA's nvcc compiler and has a runtime that "impersonates" the NVIDIA CUDA Toolkit. SCALE has been successfully tested with software like Blender, Llama-cpp, XGboost, FAISS, GOMC, STDGPU, Hashcat, and even NVIDIA Thrust. Spectral Compute has been testing SCALE across RDNA2 and RDNA3 GPUs along with basic testing on RDNA1 while Vega support is still a work-in-progress."
BOMBSHELL: "SCALE is now public as a GPGPU toolchain for allowing CUDA programs to be natively run on AMD graphics processors."
As I read it, this would be a MAJOR breakthrough for AMD. In my (limiited) knowledge of software for AI-GPU's: CUDA IS THE MOAT FOR NVIDIA established over a decade by the creation and maintenance of a comprehensive library of compilers, software tools etc that has led to the ubiquity and familiarity of their GPU's as THE standard in ML and AI.
The hitherto impossible hurdle AMD faced was, EVEN IF their GPU offerings were comparable in power consumption and performance to Nvidia's, the user community was v reluctant to abandon their familiarity with CUDA and basically reinvent the wheel on the AMD platform.
SO IF, AS THE ARTICLE CLAIMS FOR 'NEW SCALE' That AI user community can migrate to AMD's platform WITHOUT losing the decade of familiarity with CUDA!
"SCALE is now public as a GPGPU toolchain for allowing CUDA programs to be natively run on AMD graphics processors."
It almost seems too good to be true for AMD !!
SIDENOTE : It would also be a positive for MICRON as SK Hynix appears to be Nvidia's favoured HBM supplier!
Am I correct in my understanding above for AMD ?
AS It almost seems too good to be true, some questions:
-how valid is this claim that NEW SCALE actually DOES DO what it claims to do ? -what are some of the obstacles faced in the migration to AMD GPU's while retaining CUDA and using SCALE to EFFECTIVELY BE THE BRIDGE TO AMD'S RDNA# PLATFORM ? "SCALE is now public as a GPGPU toolchain for allowing CUDA programs to be natively run on AMD graphics processors." -IF this were indeed possible, WOULDN'T WE HAVE HEARD MORE ABOUT IT ?
I would think this would be major news, immediately denting the growth prospects of Nvidia, and in turn improving them for AMD. Pls fill me in on any or all of the above, providing links where you can.
I would love some to see some articles from actual use-cases where the end AI-GPU user has vouched and endorsed the claim above.
Thanks in advance !