-
-
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
WIP: cudaPackages.hasCudaObjects: init #351679
base: master
Are you sure you want to change the base?
Conversation
810f298
to
43e29fa
Compare
i opted for |
the tests of the two packages i pushed doesn't seem to pass, could use investigation |
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.
- Location: consider putting this in https://nixos.org/manual/nixpkgs/unstable/#chap-testers or maybe keep it in cudaPackages but inherit in testers
- Naming: maybe
hasCudaObjects
orhasCudaCode
orhasCuda
? - Granularity: can be left for later, but the tester could support multiple modes, namely
hasDeviceCode
(as in "any"),hasPTX
(as in specifically PTX that can be compiled at runtime),hasSASS
(takes a list, tests that concrete architectures are supported). Except I don't like these three names, say they're placeholders. - Regarding passthru-vs-checkPhase: I think we should implement this as a checkPhase hook (because checkPhases absolutely must be separated into their own derivations) but in a way that it's easy to reuse in passthru (because it'll still take ages to separate them...)
CC @ConnorBaker who probably has good ideas regarding the proper signature
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.
1,2 is done, 3 is done via optional arguments, i'll hold of on 4 until the check is finalized to save myself some rebuilds
10e7436
to
5274586
Compare
# TODO: does this work? | ||
${lib.optionalString hasPTX '' | ||
# we run cuobjdump again since --list-ptx interferes with requiredCapabilities | ||
if cuobjdump --list-ptx "$fname" 1>/dev/null 2>/dev/null; then | ||
echo " Has PTX" | ||
else | ||
echo " Does NOT have PTX" | ||
all_requirements_found=false | ||
fi | ||
''} |
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.
how can i test for runtime compiled PTX objects? Are there any examples in nixpkgs you can think of?
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.
You mean what packages we can test this tester against?
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.
Yes. Currently the test in its current form only checks the exit code of cuobjdump, but for librealsense it prints:
PTX file 1: librealsense2.so.2.56.1.sm_52.ptx
PTX file 2: librealsense2.so.2.56.2.sm_52.ptx
PTX file 3: librealsense2.so.2.56.3.sm_52.ptx
which targets sm_52, and thus I assume it is not runtime compiled?
5274586
to
f3a5c16
Compare
includes some commented code from when i tried to have the function override the provided package to enable CUDA. turns outfinalAttrs.finalPackage
does not have.override
/shrug@SomeoneSerge is this of any interest?
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.