diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 467b19b0..f38c8b55 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt - name: Cargo fmt (kernel-abi-check) run: | ( cd kernel-abi-check/kernel-abi-check && cargo fmt --all -- --check ) diff --git a/build2cmake/src/config/v2.rs b/build2cmake/src/config/v2.rs index 936b5970..16385818 100644 --- a/build2cmake/src/config/v2.rs +++ b/build2cmake/src/config/v2.rs @@ -217,6 +217,8 @@ pub enum Dependencies { Cutlass3_8, #[serde(rename = "cutlass_3_9")] Cutlass3_9, + #[serde(rename = "cutlass_4_0")] + Cutlass4_0, #[serde(rename = "cutlass_sycl")] CutlassSycl, Torch, diff --git a/build2cmake/src/torch/cuda.rs b/build2cmake/src/torch/cuda.rs index f71df783..c58db682 100644 --- a/build2cmake/src/torch/cuda.rs +++ b/build2cmake/src/torch/cuda.rs @@ -276,6 +276,17 @@ fn render_deps(env: &Environment, build: &Build, write: &mut impl Write) -> Resu ) .wrap_err("Cannot render CUTLASS dependency template")?; } + Dependencies::Cutlass4_0 => { + env.get_template("cuda/dep-cutlass.cmake") + .wrap_err("Cannot get CUTLASS dependency template")? + .render_to_write( + context! { + version => "4.0.0", + }, + &mut *write, + ) + .wrap_err("Cannot render CUTLASS dependency template")?; + } Dependencies::Torch => (), _ => { eprintln!("Warning: CUDA backend doesn't need/support dependency: {dep:?}"); diff --git a/lib/deps.nix b/lib/deps.nix index 4f96d962..bffecf01 100644 --- a/lib/deps.nix +++ b/lib/deps.nix @@ -25,6 +25,9 @@ let "cutlass_3_9" = [ pkgs.cutlass_3_9 ]; + "cutlass_4_0" = [ + pkgs.cutlass_4_0 + ]; "torch" = [ torch torch.cxxdev