mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
cudaPackages.libcublasmp: assert supported capabilities and NCCL version
cuBLASMp supports compute capability 7.5+ with CUDA 13 and 7.0+ with CUDA 12, and requires NCCL 2.29.2 or newer since 0.8.0. Assisted-by: Claude Code (Claude Opus 5.5)
This commit is contained in:
@@ -38,8 +38,6 @@ not straightforward to include. These packages are:
|
||||
- `mft_oem`: unsure of purpose; contains FHS paths.
|
||||
- `mft`: unsure of purpose; contains FHS paths.
|
||||
- `nvidia_driver`: we don't use the drivers from the CUDA releases; irrelevant.
|
||||
- `cublasmp`:
|
||||
- `libcublasmp`: `nvshmem` isn't packaged.
|
||||
- `cudnn`:
|
||||
- `cudnn_samples`: requires FreeImage, which is abandoned and not packaged.
|
||||
|
||||
|
||||
@@ -1,43 +1,80 @@
|
||||
{
|
||||
lib,
|
||||
backendStdenv,
|
||||
buildRedist,
|
||||
cudaAtLeast,
|
||||
cudaMajorVersion,
|
||||
lib,
|
||||
libcublas,
|
||||
nccl,
|
||||
}:
|
||||
buildRedist {
|
||||
redistName = "cublasmp";
|
||||
pname = "libcublasmp";
|
||||
buildRedist (
|
||||
finalAttrs:
|
||||
let
|
||||
inherit (backendStdenv) cudaCapabilities;
|
||||
cublasmpAtLeast = lib.versionAtLeast finalAttrs.version;
|
||||
in
|
||||
{
|
||||
redistName = "cublasmp";
|
||||
pname = "libcublasmp";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"include"
|
||||
"lib"
|
||||
];
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"include"
|
||||
"lib"
|
||||
];
|
||||
|
||||
# TODO: Looks like the minimum supported capability is 7.0 as of the latest:
|
||||
# https://docs.nvidia.com/cuda/cublasmp/getting_started/index.html
|
||||
# NOTE: cuBLASMp has not depended on NVSHMEM since 0.8.0:
|
||||
# https://docs.nvidia.com/cuda/cublasmp/release_notes/index.html
|
||||
buildInputs = [
|
||||
libcublas
|
||||
nccl
|
||||
];
|
||||
# NOTE: cuBLASMp has not depended on NVSHMEM since 0.8.0:
|
||||
# https://docs.nvidia.com/cuda/cublasmp/release_notes/index.html
|
||||
buildInputs = [
|
||||
libcublas
|
||||
nccl
|
||||
];
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [
|
||||
"libcuda.so.1"
|
||||
];
|
||||
autoPatchelfIgnoreMissingDeps = [
|
||||
"libcuda.so.1"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "High-performance, multi-process, GPU-accelerated library for distributed basic dense linear algebra";
|
||||
longDescription = ''
|
||||
NVIDIA cuBLASMp is a high-performance, multi-process, GPU-accelerated library for distributed basic dense linear
|
||||
algebra.
|
||||
# https://docs.nvidia.com/cuda/cublasmp/getting_started/index.html#hardware-and-software-requirements
|
||||
platformAssertions =
|
||||
let
|
||||
minCudaCapability = if cudaAtLeast "13.0" then "7.5" else "7.0";
|
||||
in
|
||||
[
|
||||
{
|
||||
message =
|
||||
"cuBLASMp for CUDA ${cudaMajorVersion} supports CUDA compute capabilities ${minCudaCapability} and newer"
|
||||
+ " (found ${builtins.toJSON cudaCapabilities})";
|
||||
assertion = lib.all (lib.flip lib.versionAtLeast minCudaCapability) cudaCapabilities;
|
||||
}
|
||||
{
|
||||
message = "cuBLASMp requires NCCL, which is unavailable for this platform";
|
||||
assertion = nccl.meta.available;
|
||||
}
|
||||
];
|
||||
|
||||
cuBLASMp is compatible with 2D block-cyclic data layout and provides PBLAS-like C APIs.
|
||||
'';
|
||||
homepage = "https://docs.nvidia.com/cuda/cublasmp";
|
||||
changelog = "https://docs.nvidia.com/cuda/cublasmp/release_notes";
|
||||
license = lib.licenses.nvidiaMath_sdk_sla;
|
||||
};
|
||||
}
|
||||
# NOTE: The requirement was raised to NCCL 2.29.2 when cuBLASMp 0.8.0 replaced NVSHMEM with NCCL symmetric memory:
|
||||
# https://web.archive.org/web/20260215220513/https://docs.nvidia.com/cuda/cublasmp/getting_started/index.html
|
||||
brokenAssertions = [
|
||||
{
|
||||
message =
|
||||
"cuBLASMp releases since 0.8.0 (found ${finalAttrs.version})"
|
||||
+ " require NCCL 2.29.2 or newer (found ${nccl.version})";
|
||||
assertion = cublasmpAtLeast "0.8" -> lib.versionAtLeast nccl.version "2.29.2";
|
||||
}
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "High-performance, multi-process, GPU-accelerated library for distributed basic dense linear algebra";
|
||||
longDescription = ''
|
||||
NVIDIA cuBLASMp is a high-performance, multi-process, GPU-accelerated library for distributed basic dense linear
|
||||
algebra.
|
||||
|
||||
cuBLASMp is compatible with 2D block-cyclic data layout and provides PBLAS-like C APIs.
|
||||
'';
|
||||
homepage = "https://docs.nvidia.com/cuda/cublasmp";
|
||||
changelog = "https://docs.nvidia.com/cuda/cublasmp/release_notes";
|
||||
license = lib.licenses.nvidiaMath_sdk_sla;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user