gpo.zugaina.org

Search Portage & Overlays:

dev-util/zluda

Drop-in replacement for CUDA on AMD GPUs

Screenshots

  • zluda-9999

    View      Download      Browse     License: || ( Apache-2.0 MIT ) Apache-2.0-with-LLVM-exceptions   
    Overlay: stuff
  • zluda-6_pre75
    ~amd64

    View      Download      Browse     License: || ( Apache-2.0 MIT ) Apache-2.0-with-LLVM-exceptions   
    Overlay: stuff

ChangeLog

commit 503a1c2de2ea7ecf7cedd3e3f260fe1dc9d74cfb
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu May 28 13:16:53 2026 +0200

dev-util/zluda: bump to 6_pre75

Track upstream's latest preview tag (v6-preview.75); the pinned 6_pre73 was two
previews behind. The .73->.75 range is PTX-impl and parser changes only — no ext/*
sys-crate or Cargo.toml changes — so the ebuild body is unchanged (EGIT_COMMIT
derives from PV). Runtime dep set re-confirmed against the .75 build: librocm_smi64
linked, libamd_comgr not.

commit 020167faf984c87b4bd0071a49029cb9191e3777
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 27 23:37:54 2026 +0200

dev-util/zluda: add 6_pre73

First tagged ebuild for ZLUDA, pinning upstream's preview tag v6-preview.73. Upstream
itself recommends preview-tagged builds — the most recent stable release is years
old. The live 9999 ebuild stays for users tracking master. git-r3 + EGIT_LFS remains
the only viable fetch path even for a pinned tag: LLVM device-libs (*.bc) are git-LFS
blobs not present in GitHub's tag tarballs. PROPERTIES=live stays per overlay policy
for keyworded ebuilds whose cargo + LFS fetches happen at build time.

commit 824c7a46073502caaca3b111b570323859cced6c
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 27 23:37:47 2026 +0200

dev-util/zluda: drop rocm-comgr, add rocm-smi from RDEPEND

amd_comgr-sys was removed from the ZLUDA workspace when upstream bundled LLVM in-tree
(fc204af, "Build and distribute LLVM"); the cdylibs we install no longer link
libamd_comgr at runtime. libnvml.so does link librocm_smi64 via the rocm_smi-sys
crate, but the dep was previously undeclared. Verified via ldd against the installed
/opt/zluda/lib*.so set. Also bumps PYTHON_COMPAT to include 3.15.

commit 2b5ea2e4f0de87061bac81f385e2f6cb2b9f1db0
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Wed May 13 14:36:03 2026 +0200

dev-util/zluda: drop python3_11 from PYTHON_COMPAT

python3.11 is EOL and python_targets_python3_11 is deprecated in ::gentoo.

commit b0475e213025473bef165a1ab6bd40bb977abc17
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu May 7 19:06:33 2026 +0200

dev-util/zluda: build cuFFT/cuBLAS/cuBLASLt/cuSPARSE replacements

xtask --release builds the workspace's default-members but skips the
math-library crates. Add an explicit pass for zluda_fft, zluda_blas,
zluda_blaslt and zluda_sparse, and install their cdylibs into
/opt/zluda/ with the linux_symlinks declared in each crate's
[package.metadata.zluda]:

zluda_fft → libcufft.so (+ .so.)
zluda_blas → libcublas.so (+ .so.)
zluda_blaslt → libcublaslt.so (+ libcublasLt.so
symlinks; upstream uses
case-mixed filenames)
zluda_sparse → libcusparse.so (+ .so.)

A CUDA app run with LD_LIBRARY_PATH=/opt/zluda now finds ZLUDA's
cuFFT/cuBLAS/cuBLASLt/cuSPARSE replacements ahead of NVIDIA's stubs in
/opt/cuda/lib64. zluda_blas/blaslt/sparse have partial real
implementations through rocBLAS / hipBLASLt / rocSPARSE; zluda_fft is
all-stub upstream today (every entry point returns NOT_SUPPORTED) but
ships the symbol surface so the dispatch path is wired. There is no
zluda_curand crate, so cuRAND-using apps still fall through to NVIDIA.

RDEPEND gains sci-libs/hipBLASLt and sci-libs/rocSPARSE for the new
sys-crates' link targets.

Verified end-to-end with sci-physics/mumax-3.12: ZLUDA's libcuda now
drives a real ROCm context on the gfx1150 iGPU; mumax3 walks through
cuInit / cuCtxCreate_v2 / device enumeration / PTX→AMDGPU JIT / memory
allocation; cuFFT calls reach zluda_fft and return CUFFT-stub-error 16
(NOT_SUPPORTED) rather than NVIDIA's CUFFT_INTERNAL_ERROR — confirming
the dispatch is now in ZLUDA, blocked only by upstream's missing FFT
implementation.

commit 4e7a3c52aeea7c3d4dfa440b4fe99be1ebb7f81b
Author: Ivan S. Titov <iohann.s.titov@gmail.com>
Date: Thu May 7 17:39:58 2026 +0200

dev-util/zluda: new package, live ebuild

ZLUDA is a CUDA-runtime replacement for AMD GPUs — translates CUDA
driver API calls and PTX kernels to AMD ROCm/HIP at runtime.
Default-members on Linux build libnvcuda.so (zluda crate),
libnvml.so (zluda_ml crate) and libzluda_ld.so (zluda_ld crate);
zluda_inject and zluda_redirect are windows_only, compiler is
debug_only, so xtask --release skips them.

Live ebuild because:
- Upstream's quick_start.md tells users to grab pre-release builds.
- ext/llvm-project is a git submodule pinned to release/17.x; the
workspace's other crate dependencies are pulled by cargo over the
network. Both fit the existing live-ebuild + RESTRICT=network-sandbox
convention used by sci-ml/{kokoros,lemonade,fastflowlm}.
- EGIT_LFS=yes is required: llvm_zluda/src/device-libs/{ockl,ocml}.bc
are git-lfs blobs and the build.rs panics on lfs stubs.

Install layout follows the upstream prebuilt zip — flat /opt/zluda/
mirroring target/release/, with the [package.metadata.zluda].linux_symlinks
recreated:
/opt/zluda/libnvcuda.so + libcuda.so symlinks
/opt/zluda/libnvml.so + libnvidia-ml.so symlinks
/opt/zluda/libzluda_ld.so + zluda_ld symlink (LD_AUDIT entry point)

Users opt in via LD_LIBRARY_PATH=/opt/zluda or LD_AUDIT=/opt/zluda/zluda_ld
so it doesn't shadow nvidia-drivers' libcuda for users with both.

No KEYWORDS — upstream warns the project is under heavy development.