Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,20 @@ final: prev:
}
);

nvidia-cuda-nvdisasm = python-self.callPackage ./pkgs/python-modules/nvidia-cuda-nvdisasm { };

nvidia-cutlass-dsl = python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl { };

nvidia-cutlass-dsl-libs = python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl-libs { };

nvidia-cutlass-dsl-libs-core =
python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl-libs-core
{ };

nvidia-cutlass-dsl-libs-cu =
python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl-libs-cu
{ };

kernels = callPackage ./pkgs/python-modules/kernels { };

kernels-data = callPackage ./pkgs/python-modules/kernels-data { };
Expand Down
64 changes: 64 additions & 0 deletions nix-builder/pkgs/python-modules/nvidia-cuda-nvdisasm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchPypi,
python,

buildPythonPackage,
autoPatchelfHook,
autoAddDriverRunpath,
pythonRelaxWheelDepsHook,
pythonWheelDepsCheckHook,

cudaPackages,
cuda-python,
numpy,
protobuf6,
typing-extensions,
}:

let
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
hashes = {
cp313-aarch64-linux = "sha256-3UdRiE+QFrm22/AHq961aB0KLtxzHdPS/anW2Hjoj3M=";
cp313-x86_64-linux = "sha256-+hcISwfA3KaKQokvdxtLG0D76bkWYCCWI+Yc6mEcrow=";
};
hash =
hashes."${pyShortVersion}-${stdenv.system}"
or (throw "Unsupported Python version: ${pyShortVersion}-${stdenv.system}");
processor = stdenv.hostPlatform.uname.processor;

in
buildPythonPackage rec {
pname = "nvidia-cuda-nvdisasm";
version = "13.3.73";
inherit format;

src = fetchPypi {
pname = "nvidia_cuda_nvdisasm";
dist = "py3";
python = "py3";
abi = "none";
platform = "manylinux2014_${processor}.manylinux_2_17_${processor}";
inherit format hash version;
};

nativeBuildInputs = [
autoAddDriverRunpath
autoPatchelfHook
pythonWheelDepsCheckHook
];

autoPatchelfIgnoreMissingDeps = [
"libcuda.so.1"
];

meta = {
description = "Extract information from standalone cubin files";
homepage = "https://developer.nvidia.com/cuda";
license = lib.licenses.unfree;
broken = !(stdenv.hostPlatform.isLinux && cudaPackages.cudaAtLeast "12.8");
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
buildPythonPackage,
fetchurl,

pythonRelaxDepsHook,
setuptools,

cuda-python,
numpy,
nvidia-cuda-nvdisasm,
protobuf6,
typing-extensions,
}:

buildPythonPackage rec {
pname = "nvidia-cutlass-dsl-libs-core";
version = "4.6.1";
format = "wheel";

src = fetchurl {
url = "https://files.pythonhosted.org/packages/py3/n/nvidia_cutlass_dsl_libs_core/nvidia_cutlass_dsl_libs_core-${version}-py3-none-any.whl";
hash = "sha256-8diV7iSxunEbK51KQ8Yvofb+OlBjTiXu/+iPoX9sXkc=";
};

dependencies = [
cuda-python
numpy
nvidia-cuda-nvdisasm
protobuf6
typing-extensions
];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchPypi,
python,

buildPythonPackage,
autoPatchelfHook,
autoAddDriverRunpath,
pythonRelaxWheelDepsHook,
pythonWheelDepsCheckHook,

cudaPackages,
cuda-python,
numpy,
nvidia-cuda-nvdisasm,
nvidia-cutlass-dsl-libs-core,
protobuf6,
typing-extensions,
}:

let
cudaMajor = cudaPackages.cudaMajorVersion;
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
hashes = {
cp313-x86_64-linux-cu12 = "sha256-JQS1vbLwIQpqG8kjrO/peQBjZmlLc/FFijyFca7zt2U=";
cp313-aarch64-linux-cu12 = "sha256-F9nVvbj1MCZtyEJCNqgFI+4qmAfoUqJMIglkOKEt870=";
cp313-x86_64-linux-cu13 = "sha256-famVhPTw1JjKcKZHAiqylcpUoglJRBGBzQwyiVhNqKM=";
cp313-aarch64-linux-cu13 = "sha256-gTcFEd/Z4cCNojAs8UD0reyJ31BOw0iiOwiqAXRyDsM=";
};
hash =
hashes."${pyShortVersion}-${stdenv.system}-cu${cudaMajor}"
or (throw "Unsupported Python version: ${pyShortVersion}-${stdenv.system}-cu${cudaMajor}");

Comment on lines +32 to +35

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

in
buildPythonPackage rec {
pname = "nvidia-cutlass-dsl-libs-cu${cudaMajor}";
version = "4.6.1";
inherit format;

src = fetchPypi {
pname = "nvidia_cutlass_dsl_libs_cu${cudaMajor}";
python = pyShortVersion;
abi = pyShortVersion;
dist = pyShortVersion;
platform = "manylinux_2_28_${stdenv.hostPlatform.uname.processor}";
inherit format hash version;
};

nativeBuildInputs = [
autoAddDriverRunpath
autoPatchelfHook
pythonRelaxWheelDepsHook
pythonWheelDepsCheckHook
];

dependencies = [
cuda-python
numpy
nvidia-cuda-nvdisasm
nvidia-cutlass-dsl-libs-core
protobuf6
typing-extensions
];

autoPatchelfIgnoreMissingDeps = [
"libcuda.so.1"
];

pythonRemoveDeps = [
# nvidia-cutlass-dsl-libs-cu13 has a dependency on the base package,
# but it has the same contents + CUDA 13 extensions.
"nvidia-cutlass-dsl-libs-base"
];

meta = {
description = "NVIDIA CUTLASS Python DSL native libraries";
homepage = "https://github.com/NVIDIA/cutlass";
license = lib.licenses.unfree;
broken = !(stdenv.hostPlatform.isLinux && cudaPackages.cudaAtLeast "12.8");
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
24 changes: 14 additions & 10 deletions nix-builder/pkgs/python-modules/nvidia-cutlass-dsl-libs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
cudaPackages,
cuda-python,
numpy,
nvidia-cuda-nvdisasm,
nvidia-cutlass-dsl-libs-core,
nvidia-cutlass-dsl-libs-cu,
protobuf6,
typing-extensions,
}:

let
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
hashes = {
cp313-x86_64-linux-cu12 = "sha256-jliwFtpbsJvR2AnQwCVDPts2snmt+80QfpY2GyFL2Lw=";
cp313-aarch64-linux-cu12 = "sha256-kKTYAqA5Y/o26yh/vJtAoTdFkPx+jMG5Zz3uiHL3VxM=";
cp313-x86_64-linux-cu13 = "sha256-VUt3UGnQk/MIlJpliAv5yb/Uix9LL9Dg2Xqi9gjm7qE=";
cp313-aarch64-linux-cu13 = "sha256-8rghZxrdLmmhN35/2H5iYZldsoGy+OUW3a4v1remwdA=";
cp313-x86_64-linux-cu12 = "sha256-CaaqzoQVlOo5z3X3zuaNwxuM88263/y9SU8I/HPGRm0=";
cp313-aarch64-linux-cu12 = "sha256-fKTlypvQyqLseX67HkBLs+sPdtI1gjYReVyxTY00Hkw=";
cp313-x86_64-linux-cu13 = "sha256-CaaqzoQVlOo5z3X3zuaNwxuM88263/y9SU8I/HPGRm0=";
cp313-aarch64-linux-cu13 = "sha256-fKTlypvQyqLseX67HkBLs+sPdtI1gjYReVyxTY00Hkw=";
};
hash =
hashes."${pyShortVersion}-${stdenv.system}-cu${cudaPackages.cudaMajorVersion}"
Expand All @@ -32,15 +36,11 @@ let
in
buildPythonPackage rec {
pname = "nvidia-cutlass-dsl-libs";
version = "4.5.0";
version = "4.6.1";
inherit format;

src = fetchPypi {
pname =
if cudaPackages.cudaAtLeast "13.0" then
"nvidia_cutlass_dsl_libs_cu13"
else
"nvidia_cutlass_dsl_libs_base";
pname = "nvidia_cutlass_dsl_libs_base";
Comment on lines -39 to +43

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for standardizing the pname?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cu12/cu13 are now in sync with the package naming/splits, so we can give this the common name.

python = pyShortVersion;
abi = pyShortVersion;
dist = pyShortVersion;
Expand All @@ -58,6 +58,10 @@ buildPythonPackage rec {
dependencies = [
cuda-python
numpy
nvidia-cuda-nvdisasm
nvidia-cutlass-dsl-libs-core
nvidia-cutlass-dsl-libs-cu
protobuf6
typing-extensions
];

Expand Down
10 changes: 5 additions & 5 deletions nix-builder/pkgs/python-modules/nvidia-cutlass-dsl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ let
in
buildPythonPackage rec {
pname = "nvidia-cutlass-dsl";
version = "4.5.0";
version = "4.6.1";
inherit format;

src = fetchPypi {
inherit format version;
pname = "nvidia_cutlass_dsl";
dist = "py3";
python = "py3";
hash = "sha256-OwUf4CymlCKrhA5k2YZWZ6uiiKOYSnykzNA4qCrvE0Q=";
hash = "sha256-kxNanUjhvt9YSCjgoCHxdKwxWR7yH26lPCBhacy/qyY=";
};

nativeBuildInputs = [
Expand All @@ -36,11 +36,11 @@ buildPythonPackage rec {
];

pythonRemoveDeps = lib.optionals (cudaPackages.cudaAtLeast "13.0") [
# nvidia-cutlass-dsl-libs-cu13 has a dependency on the base package,
# but it has the same contents + CUDA 13 extensions.
"nvidia-cutlass-dsl-libs-base"
"nvidia-cutlass-dsl-libs-cu12"
];

pythonImportsCheck = [ "nvidia_cutlass_dsl" ];

meta = {
broken = nvidia-cutlass-dsl-libs.meta.broken;
};
Expand Down
Loading