AI product Open source
DeepJIT is a lightweight, header-only C++20 library for just-in-time compilation, caching, loading, and launching of device kernels on NVIDIA CUDA GPUs and Huawei Ascend NPUs. It provides a shared runtime interface for both backends while keeping kernel source and compiler options backend-specific.
The runtime hashes kernel source, tracked includes, compiler information, effective options, and application-provided dependency signatures to reuse compiled artifacts through in-memory and on-disk caches. Cache directories can be shared across users, processes, and nodes on local or distributed filesystems, with completed entries published through atomic directory renames. Lazy initialization defers device and compiler discovery until first use.
DeepJIT integrates with PyTorch CUDA and torch_npu streams and can expose a runtime through pybind11. The CUDA backend uses NVCC and the CUDA Driver API to produce, load, and launch CUBIN files; the Ascend backend uses Bisheng, ld.lld, and ACL to compile, link, load, and launch kernels. It supports per-kernel compiler and launch options, compilation diagnostics, and optional PTX, SASS, or Ascend assembly dumps. The host environment requires Linux, a C++20 compiler with std::format support, Python, pybind11, and the dependencies for the selected backend; it is intended to be embedded in another C++ or Python extension as a header-only dependency.
1 use taken from transcripts — each links to the moment in the video.
A header-only C++ library for compiling, caching, and launching device kernels at runtime across NVIDIA CUDA GPUs and Huawei Ascend MPUs, with PyTorch device-stream integration.
1 in the library.