A set of libraries enabling native execution of D code on GPUs and other accelerators via OpenCL and CUDA runtimes.
DCompute is a set of libraries that enables native execution of D programming language code on GPUs and other accelerators using OpenCL and CUDA runtimes. It solves the problem of GPU programming complexity by allowing developers to write kernels directly in D, providing high-level abstractions and a consistent API across different compute backends.
D language developers and researchers who need to leverage GPU acceleration for high-performance computing, scientific simulations, or data-parallel tasks without leaving the D ecosystem.
Developers choose DCompute because it offers a native D experience for GPU programming, eliminating the need to learn or maintain separate CUDA C or OpenCL C codebases, while providing performance close to the metal through direct runtime integration.
DCompute: Native execution of D on GPUs and other Accelerators
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows writing GPU kernels directly in D using familiar syntax, as shown in the saxpy kernel example, eliminating the need for separate CUDA C or OpenCL C codebases.
Targets both OpenCL and CUDA from the same codebase, providing flexibility for hardware choice, as indicated by the ability to use flags like -mdcompute-targets for multiple backends.
Offers a std library with GPU-targeted functionality and abstractions over OpenCL/CUDA intrinsics, simplifying common compute tasks while retaining low-level access via the driver API.
Includes standard kernels and primitives in the kernels library, covering common use cases and serving as practical documentation, as mentioned in the tests section.
Requires a specific LDC compiler version (1.8.0+) with SPIRV or NVPTX backend builds, plus detailed dub flag configurations, making setup error-prone and time-consuming, as noted in the build instructions.
Being part of the D language ecosystem, it lacks the extensive community support, third-party tools, and mature debugging options available in more established GPU frameworks like CUDA C++.
The README admits TODOs such as generating OpenCL builtins, indicating missing functionality that could hinder advanced use cases or require manual workarounds.
Requires proficiency in D and its GPU extensions, which may not be practical for teams unfamiliar with the language, unlike more accessible options like PyCUDA for Python developers.