Skip to content

Conversation

@LunNova
Copy link
Member

@LunNova LunNova commented Sep 1, 2025

Diff: ROCm/aotriton@0.9.2b...0.10b

This is a rewrite of aotriton/default.nix. We're properly reusing the existing python3Packages.triton instance as the build-time triton instead of letting aotriton's CMakeLists.txt build its own triton, so lots of hackery can be dropped! and some packages that weren't actually used and were in buildInputs 😅

If in future we needed to pin a specific triton source rev here with an override it should be relatively safe as it's a build time only dependency and won't run into collisions like in many cases in python packaging.
For now we have no need to pin triton; aotriton builds happily against triton 3.4.

This is a followup to the recent torch bump #431973. torch 2.8 introduced faster sliding window attention via aotriton but requires a minimum version of 0.10b to enable it.

https://github.com/pytorch/pytorch/blob/379ebdaf5e2fbf387de297f673254d005e583b31/aten/src/ATen/native/transformers/hip/flash_attn/aot/mha_all_aot.hip#L96-L119

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. labels Sep 1, 2025
@LunNova

This comment was marked as outdated.

Copy link
Member

@Flakebi Flakebi left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Sep 1, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2530

@LunNova LunNova mentioned this pull request Sep 2, 2025
18 tasks
Copy link
Member

@pbsds pbsds left a comment

Choose a reason for hiding this comment

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

I like the new expression as it reads a lot better. My build is still running, but some comments for now

@LunNova LunNova force-pushed the lunnova/aotriton-0.10b branch 2 times, most recently from 3a36d43 to 248906f Compare September 3, 2025 19:17
@LunNova

This comment was marked as outdated.

@LunNova LunNova force-pushed the lunnova/aotriton-0.10b branch from 248906f to 1bb7513 Compare September 3, 2025 19:43
@LunNova

This comment was marked as outdated.

@LunNova
Copy link
Member Author

LunNova commented Sep 3, 2025

Oh that's fun. The combination of this diff and 2a2a51e doesn't build, but either works alone. Marking draft since that just got merged, glad we didn't merge both in quick succession.

@LunNova LunNova marked this pull request as draft September 3, 2025 20:19
@LunNova LunNova force-pushed the lunnova/aotriton-0.10b branch from 1bb7513 to fc5983d Compare September 3, 2025 20:46
@LunNova LunNova force-pushed the lunnova/aotriton-0.10b branch from fc5983d to 400c14c Compare September 3, 2025 20:55
@LunNova LunNova marked this pull request as ready for review September 3, 2025 21:03
@LunNova
Copy link
Member Author

LunNova commented Sep 4, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 439056
Commit: 400c14cf497caf497319d46682eaceee8e80d821


x86_64-linux

✅ 14 packages built:
  • python312Packages.torchWithRocm
  • python312Packages.torchWithRocm.cxxdev
  • python312Packages.torchWithRocm.dev
  • python312Packages.torchWithRocm.dist
  • python312Packages.torchWithRocm.lib
  • python313Packages.torchWithRocm
  • python313Packages.torchWithRocm.cxxdev
  • python313Packages.torchWithRocm.dev
  • python313Packages.torchWithRocm.dist
  • python313Packages.torchWithRocm.lib
  • rocmPackages.aotriton (rocmPackages_6.aotriton)
  • rocmPackages.aotriton.debug (rocmPackages_6.aotriton.debug)
  • rocmPackages.mivisionx (rocmPackages.mivisionx-hip, rocmPackages_6.mivisionx, rocmPackages_6.mivisionx-hip)
  • rocmPackages.mivisionx-cpu (rocmPackages_6.mivisionx-cpu)

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

LGTM overall. Made minor comments.

@nixpkgs-ci nixpkgs-ci bot removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 4, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Sep 4, 2025
Diff: ROCm/aotriton@0.9.2b...0.10b

Significantly improves the build by reusing python3Packages.triton
@LunNova LunNova force-pushed the lunnova/aotriton-0.10b branch from 400c14c to 4f33cb4 Compare September 4, 2025 15:24
@LunNova
Copy link
Member Author

LunNova commented Sep 4, 2025

Applied both suggestions

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

Thanks. Would like a second opinion though.

@GaetanLepage GaetanLepage requested a review from NickCao September 4, 2025 17:00
@pbsds pbsds merged commit 6d57e7e into NixOS:master Sep 7, 2025
29 of 31 checks passed
@LunNova LunNova deleted the lunnova/aotriton-0.10b branch September 8, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants