-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python3.pkgs.{torch,triton}: two copies of llvm in the closure #256571
Comments
IIRC triton requires its own patched version of llvm, but weird that we'd have two different patched versions somehow 🤔 |
I thought they had moved largely towards building LLVM HEAD (or at least trying to track it more closely). I do remember the python setup script downloading a pre-built copy of LLVM with MLIR (MLIR might not be present in the default version of LLVM most distributions make available?), but I think that was more for convenience than anything else. https://github.com/openai/triton/blob/c4bc3fd92f79a1a470f0a3a086c0fa525124bc6d/python/setup.py#L69 It looks like it supports building with arbitrary LLVM (https://github.com/openai/triton#building-with-a-custom-llvm), just not arbitrary versions due to breaking changes and whatnot. EDIT: This issue is probably also still relevant: triton-lang/triton#1617 |
Well since we're bringing this up, there's actually even more divergence: upstream Pytorch wheels are built against the HEAD of the fork of openai/triton, which in turn is built against the HEAD of LLVM. We're rebuilding LLVM for Pytorch anyway, maybe we should use both LLVM and Triton from ROCmSoftwarePlatform/ As for the original issue, we probably just need to override
nixpkgs/pkgs/development/python-modules/openai-triton/default.nix Lines 31 to 38 in 378c0c6
EDIT: But also, idk what exactly the llvm package includes, or how much of that openai/triton actually uses... |
You may want to see the |
Shouldn't this be fixed now? |
Yes, this might have been fixed. We need to inspect nix-tree (if not add an automated check...) before we close the issue |
Inspected with |
I'm afraid we may still be suffering from this issue: there's only
Each is about 1.5GiB of added size judging by @Madouura could you please confirm my interpretation and reopen the issue? EDIT: the |
Ah. I didn't realize we had to use |
Issue description
...one brought in by mlir, and one seemingly brought it directly. E.g. on my current system (paths included only to show they're different):
python3-3.10.12-env → python3.10-triton-2.0.0 → rocm-llvm-mlir-5.4.4 → hip-amd-5.4.4 → rocm-opencl-runtime-5.4.4 → rocm-runtime-5.4.3 → rocm-llvm-clang-5.4.4 → rocm-llvm-llvm-5.4.4
/nix/store/hg2nby9s72yc2lx2by4fn9smffnv0iyd-rocm-llvm-llvm-5.4.4
python3-3.10.12-env → python3.10-triton-2.0.0 → rocm-llvm-llvm-5.4.4
:/nix/store/j0vfk0ybphyv9398svhxz303x11aanpa-rocm-llvm-llvm-5.4.4
@NixOS/cuda-maintainers
The text was updated successfully, but these errors were encountered: