Skip to content

python312Packages.torch: test torch.compile#328661

Merged
SomeoneSerge merged 5 commits intoNixOS:masterfrom
SomeoneSerge:feat/torch-compile-test
Jul 20, 2024
Merged

python312Packages.torch: test torch.compile#328661
SomeoneSerge merged 5 commits intoNixOS:masterfrom
SomeoneSerge:feat/torch-compile-test

Conversation

@SomeoneSerge
Copy link
Contributor

Description of changes

Adds tests (including GPU/runtime checks) to document the premises for #328247

Status:

  • .#python311Packages.torch.tests.compileCpu
  • 🟥 .#python312Packages.torch.tests.compileCpu ("Dynamo is not supported on Python 3.12+")
  • 🟥 .#python3Packages.torch.tests.tester-compileCuda.gpuCheck ("Dynamo is not supported on Python 3.12+")
  • 🟥 .#python311Packages.torch.tests.tester-compileCuda.gpuCheck ("ImportError: cannot import name 'get_cuda_version_key' from 'triton.common.backend'"); this functionality was working at the time of merging python3Packages.openai-triton: fix triton.common.build #325843

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@SomeoneSerge SomeoneSerge added the 6.topic: cuda Parallel computing platform and API label Jul 20, 2024
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 20, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 20, 2024
@DerDennisOP
Copy link
Contributor

btw torch.compile works for cpu, but not for gpu rn

@SomeoneSerge
Copy link
Contributor Author

btw torch.compile works for cpu, but not for gpu rn

You mean master or the triton PR?

@DerDennisOP
Copy link
Contributor

master

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I switched from writers.writePython3Bin to a simple runCommand because it was easier to override python3Packages this way. Either way I'll keep editing this thing

@SomeoneSerge SomeoneSerge merged commit 10f0788 into NixOS:master Jul 20, 2024
@trofi
Copy link
Contributor

trofi commented Jul 23, 2024

Possibly broke eval failure as:

$ nix-instantiate -A python3Packages.pytorch-bin.tests
error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at lib/customisation.nix:264:13:
          263|     in if missingArgs == {}
          264|        then makeOverridable f allArgs
             |             ^
          265|        # This needs to be an abort so it can't be caught with `builtins.tryEval`,

       … while evaluating a branch condition
         at lib/customisation.nix:148:7:
          147|     in
          148|       if isAttrs result then
             |       ^
          149|         result // {

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'torchWithCuda'
       at pkgs/development/python-modules/torch/tests.nix:1:1:
            1| { callPackage }:
             | ^
            2|

@trofi
Copy link
Contributor

trofi commented Jul 23, 2024

Proposed the trivial change as #329511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cuda Parallel computing platform and API 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants