Skip to content

Commit

Permalink
python3Packages.openai-triton: justify the use of pkgsTargetTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Apr 7, 2023
1 parent 24d20fe commit 632cff6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/openai-triton/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ let
version = "2.0.0";

inherit (cudaPackages) cuda_cudart backendStdenv;

# A time may come we'll want to be cross-friendly
#
# Short explanation: we need pkgsTargetTarget, because we use string
# interpolation instead of buildInputs.
#
# Long explanation: OpenAI/triton downloads and vendors a copy of NVidia's
# ptxas compiler. We're not running this ptxas on the build machine, but on
# the user's machine, i.e. our Target platform. The second "Target" in
# pkgsTargetTarget maybe doesn't matter, because ptxas compiles programs to
# be executed on the GPU.
# Cf. https://nixos.org/manual/nixpkgs/unstable/#sec-cross-infra
ptxas = "${pkgsTargetTarget.cudaPackages.cuda_nvcc}/bin/ptxas";

llvm = (llvmPackages.llvm.override {
Expand Down

0 comments on commit 632cff6

Please sign in to comment.