Skip to content
Closed
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
13 changes: 12 additions & 1 deletion kernel-builder/src/pyproject/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,18 @@ pub fn render_deps(env: &Environment, build: &Build, write: &mut impl Write) ->
.wrap_err("Cannot get CUTLASS dependency template")?
.render_captured_to(
context! {
version => "4.5.2",
version => "4.5.3",
},
&mut *write,
)
.wrap_err("Cannot render CUTLASS dependency template")?;
}
Dependency::Cutlass4_6 => {
env.get_template("cuda/dep-cutlass.cmake")
.wrap_err("Cannot get CUTLASS dependency template")?
.render_captured_to(
context! {
version => "4.6.1",
},
&mut *write,
)
Expand Down
2 changes: 2 additions & 0 deletions kernels-data/src/config/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pub enum Dependency {
Cutlass4_0,
#[serde(rename = "cutlass_4_5")]
Cutlass4_5,
#[serde(rename = "cutlass_4_6")]
Cutlass4_6,
#[serde(rename = "sycl_tla")]
SyclTla,
#[serde(rename = "metal-cpp")]
Expand Down
4 changes: 4 additions & 0 deletions kernels-data/src/python_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"nvidia-cutlass-dsl": {
"nix": ["nvidia-cutlass-dsl"],
"python": [{ "pkg": "nvidia-cutlass-dsl", "import": "cutlass" }]
},
"nvidia-cutlass-dsl_4_6": {
"nix": ["nvidia-cutlass-dsl_4_6"],
"python": [{ "pkg": "nvidia-cutlass-dsl", "import": "cutlass" }]
}
},
"metal": {},
Expand Down
3 changes: 3 additions & 0 deletions nix-builder/lib/deps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ let
"cutlass_4_5" = [
pkgs.cutlass_4_5
];
"cutlass_4_6" = [
pkgs.cutlass_4_6
];
"torch" = [
torch
];
Expand Down
20 changes: 20 additions & 0 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,26 @@ final: prev:

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

# CuteDSL 4.6 alongside 4.5: sonic-moe pins 4.6, flash-attn4 and msa are unvalidated on
# it, so kernels opt in per-kernel via `python-depends` rather than all moving at once.
nvidia-cutlass-dsl_4_6 = python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl {
version = "4.6.1";
hash = "sha256-kxNanUjhvt9YSCjgoCHxdKwxWR7yH26lPCBhacy/qyY=";
nvidia-cutlass-dsl-libs = python-self.nvidia-cutlass-dsl-libs_4_6;
};

nvidia-cutlass-dsl-libs_4_6 =
python-self.callPackage ./pkgs/python-modules/nvidia-cutlass-dsl-libs
{
version = "4.6.1";
hashes = {
cp313-x86_64-linux-cu12 = "sha256-CaaqzoQVlOo5z3X3zuaNwxuM88263/y9SU8I/HPGRm0=";
cp313-aarch64-linux-cu12 = "sha256-fKTlypvQyqLseX67HkBLs+sPdtI1gjYReVyxTY00Hkw=";
cp313-x86_64-linux-cu13 = "sha256-famVhPTw1JjKcKZHAiqylcpUoglJRBGBzQwyiVhNqKM=";
cp313-aarch64-linux-cu13 = "sha256-gTcFEd/Z4cCNojAs8UD0reyJ31BOw0iiOwiqAXRyDsM=";
};
};

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

kernels-data = callPackage ./pkgs/python-modules/kernels-data { };
Expand Down
9 changes: 7 additions & 2 deletions nix-builder/pkgs/cutlass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ in
};

cutlass_4_5 = builder {
version = "4.5.2";
hash = "sha256-jnxookfCEPynRrxMGGsMwPlK84ChQQW3xocmYcNTVLw=";
version = "4.5.3";
hash = "sha256-jbS3EWX8g9SL5zuqFCNgFx/osu+/qcICrMlHSd1UAas=";
};

cutlass_4_6 = builder {
version = "4.6.1";
hash = "sha256-Eru8FdTUwuc4xXD9Pu8r0nRP9eK2MTIHHs9eNEiKQ0g=";
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@
cuda-python,
numpy,
typing-extensions,
}:

let
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
hashes = {
# Versioned alongside `nvidia-cutlass-dsl`; defaults keep existing consumers on 4.5.0.
version ? "4.5.0",
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=";
};
},
}:

let
format = "wheel";
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
hash =
hashes."${pyShortVersion}-${stdenv.system}-cu${cudaPackages.cudaMajorVersion}"
or (throw "Unsupported Python version: ${pyShortVersion}-${stdenv.system}-cu${cudaPackages.cudaMajorVersion}");

in
buildPythonPackage rec {
pname = "nvidia-cutlass-dsl-libs";
version = "4.5.0";
inherit format;
inherit format version;

src = fetchPypi {
pname =
Expand Down
10 changes: 7 additions & 3 deletions nix-builder/pkgs/python-modules/nvidia-cutlass-dsl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@
cudaPackages,

nvidia-cutlass-dsl-libs,

# Versioned so several CuteDSL releases can coexist (same pattern as the C++ `cutlass_*`
# attributes): kernels pick one via `python-depends`, nobody is migrated implicitly.
version ? "4.5.0",
hash ? "sha256-OwUf4CymlCKrhA5k2YZWZ6uiiKOYSnykzNA4qCrvE0Q=",
}:

let
format = "wheel";
in
buildPythonPackage rec {
pname = "nvidia-cutlass-dsl";
version = "4.5.0";
inherit format;
inherit format version;

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

nativeBuildInputs = [
Expand Down
Loading