4 ms·
CUDA is not an API, CUDA is a language, so you cannot make that comparison.
by jacobgorm 12d ago
CUDA is not an API, CUDA is a language, so you cannot make that comparison.
- esseph 12d ago> The CUDA runtime is a special case of one of the libraries provided by the CUDA Toolkit. The CUDA runtime provides both an API and some language extensions to handle common tasks such as allocating memory, copying data between GPUs and other GPUs or CPUs, and launching kernels. The API components of the CUDA runtime are referred to as the CUDA runtime API. From: https://docs.nvidia.com/cuda/cuda-programming-guide/01-introduction/cuda-platform.html https://docs.nvidia.com/cuda/cuda-programming-guide/01-intro...
- pjmlp 12d agoCUDA is neither an API, nor a language, it is an ecosystem.
- fc417fc802 12d agoThat's a nice way of saying that it's a dependency clusterfuck. I've never understood why we can't just expose the GPU ISA directly the way the CPU does. It's all getting compiled down at the end of the day so someone has to write a compiler for it either way. We'd be substantially better off IMO if it was all built directly into LLVM and then let middleware sort out the details.
- pjmlp 11d agoBecause even CPUs rather use JIT runtimes to deal with the various kinds of ISAs that exist. Naturally plenty of folks rather use software that doesn't take advantage of the hardware they paid for.
- imtringued 11d agoThat would require vendors to either stick with a single backwards compatible ISA like intel did for x86 or document how their graphics cards work. CPUs manage this by changing the internal micro-architecture, but historically GPUs only needed to support a graphics API and used that abstraction layer to freely change the hardware.
- dev_hugepages 11d agoIf i'm not mistaken, this already exists, and the assembly language here is called PTX https://llvm.org/docs/NVPTXUsage.html https://llvm.org/docs/NVPTXUsage.html
- pjmlp 11d agoPTX is a bytecode format, the CUDA driver JIT compiles it when uploading into the cards.
- fc417fc802 11d agoCan't the same also be said of much of the x86 vocabulary at this point? I appreciate that we can upload SPIR-V directly. The API still feels overly obtuse but it's not so bad. SYCL gets close but is language specific.
- deleted 11d ago[deleted]