Skip to content

Add cuSPARSELt redistribution support - #24

Open
ryanli wants to merge 1 commit into
hermeticbuild:mainfrom
ryanli:cusparselt
Open

ryanli wants to merge 1 commit into
hermeticbuild:mainfrom
ryanli:cusparselt

Conversation

@ryanli

@ryanli ryanli commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

NVIDIA publishes official redistrib manifests for cuSPARSELt, so the component follows the cuDNN/NVSHMEM model: a new cusparselt_version attribute on cuda_ext.redist(...) pins a cuSPARSELt release per registered CUDA version, exposed as @cuda//cusparselt. Manifests are prefetched asynchronously alongside the CUDA/cuDNN/NVSHMEM ones.

The version catalog covers every release NVIDIA publishes a manifest for (0.3.0 through 0.9.1); all manifest sha256s were computed from the downloaded files. Releases up to 0.7.1 publish one archive per platform (linux-x86_64 and linux-sbsa), while 0.8.0+ publish per-CUDA-major cuda_variant archives; the existing variant selection picks the archive matching the registered CUDA major, and requesting a version with no archive for that major fails during module extension evaluation.

The cusparselt.BUILD.bazel template exports the full target family: cusparselt / cusparselt_shared_library, cusparselt_system / cusparselt_interface_library (linking through the archive's unversioned libcusparseLt.so, since cuSPARSELt ships no lib/stubs/ directory), cusparselt_static / cusparselt_static_library, plus headers, header_list, and shared_library_files. cusparselt_static also links the hermetic static CUDA runtime because libcusparseLt_static.a leaves CUDA runtime symbols undefined (the shared library embeds the runtime statically). headers depends on the cusparse and cudart header closures, since cusparseLt.h includes cusparse.h, driver_types.h, and library_types.h. shared_library_files stages only the fully versioned shared library: the SONAME (libcusparseLt.so.0) is a truncation of the versioned file name, so the runtime symlink is derivable.

e2e: cusparselt_smoke, cusparselt_system_smoke, and (manual, like the other static smokes) cusparselt_static_smoke link against cusparseLtGetVersion; every registered CUDA version pins a cusparselt_version, covering both manifest shapes.

NVIDIA publishes official redistrib manifests for cuSPARSELt, so the
component follows the cuDNN/NVSHMEM model: a new cusparselt_version
attribute on cuda_ext.redist(...) pins a cuSPARSELt release per
registered CUDA version, exposed as @cuda//cusparselt. Manifests are
prefetched asynchronously alongside the CUDA/cuDNN/NVSHMEM ones.

The version catalog covers every release NVIDIA publishes a manifest
for (0.3.0 through 0.9.1); all manifest sha256s were computed from the
downloaded files. Releases up to 0.7.1 publish one archive per
platform (linux-x86_64 and linux-sbsa), while 0.8.0+ publish
per-CUDA-major cuda_variant archives; the existing variant selection
picks the archive matching the registered CUDA major, and requesting a
version with no archive for that major fails during module extension
evaluation.

The cusparselt.BUILD.bazel template exports the full target family:
cusparselt / cusparselt_shared_library, cusparselt_system /
cusparselt_interface_library (linking through the archive's
unversioned libcusparseLt.so, since cuSPARSELt ships no lib/stubs/
directory), cusparselt_static / cusparselt_static_library, plus
headers, header_list, and shared_library_files. cusparselt_static
also links the hermetic static CUDA runtime because
libcusparseLt_static.a leaves CUDA runtime symbols undefined (the
shared library embeds the runtime statically). headers depends on the
cusparse and cudart header closures, since cusparseLt.h includes
cusparse.h, driver_types.h, and library_types.h. shared_library_files
stages only the fully versioned shared library: the SONAME
(libcusparseLt.so.0) is a truncation of the versioned file name, so
the runtime symlink is derivable.

e2e: cusparselt_smoke, cusparselt_system_smoke, and (manual, like the
other static smokes) cusparselt_static_smoke link against
cusparseLtGetVersion; every registered CUDA version pins a
cusparselt_version, covering both manifest shapes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant