-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
python3Packages.pytorch-ocl: init at 0.2.0 #349547
base: master
Are you sure you want to change the base?
Conversation
pkgs/top-level/python-packages.nix
Outdated
@@ -12987,6 +12987,8 @@ self: super: with self; { | |||
|
|||
pytools = callPackage ../development/python-modules/pytools { }; | |||
|
|||
pytorch-ocl = callPackage ../development/python-modules/pytorch-ocl { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting seems to be off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
"pytorch_ocl" | ||
]; | ||
|
||
meta = with lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta = with lib; { | |
meta = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that, but could you give me more information about why going without the with
statement is better? I'm asking because I had PRs where the exact opposite (moving lib
outside into a with
statement) was requested in reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://nix.dev/guides/best-practices.html
I just read it here where they say to avoid using 'with', smaller scopes are supposedly fine, so I guess you can ignore it if you don't feel like changing this part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the large number of packages using meta = with lib; {...
currently, I guess it's indeed fine, and will stick with it for now. Anyway thanks for the pointer.
|
||
meta = with lib; { | ||
description = "DLPrimitives/OpenCL out of tree backend for pytorch"; | ||
maintainers = with maintainers; [ gm6k ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainers = with maintainers; [ gm6k ]; | |
maintainers = with lib.maintainers; [ gm6k ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
meta = with lib; { | ||
description = "DLPrimitives/OpenCL out of tree backend for pytorch"; | ||
maintainers = with maintainers; [ gm6k ]; | ||
license = licenses.mit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license = licenses.mit; | |
license = lib.licenses.mit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
homepage = "https://github.com/artyom-beilis/pytorch_dlprim"; | ||
changelog = "https://github.com/artyom-beilis/pytorch_dlprim/releases/tag/${src.rev}"; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
src = fetchFromGitHub { | ||
owner = "artyom-beilis"; | ||
repo = "pytorch_dlprim"; | ||
rev = "${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rev = "${version}"; | |
rev = "${finalAttrs.version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
@ofborg build python312Packages.pytorch-ocl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked again, with current versions of dependencies the build fails: https://paste.fliegendewurst.eu/2AHXPc.log#L126
CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR
and more are not defined.
Adding an out-of-tree backend to use pytorch accelerated by OpenCL devices.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.