-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
{cudaPackages.nccl, onnxruntime}: remove reference to nvcc in binary #457803
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |||||
| perl, | ||||||
| pkg-config, | ||||||
| python3Packages, | ||||||
| removeReferencesTo, | ||||||
| re2, | ||||||
| zlib, | ||||||
| protobuf, | ||||||
|
|
@@ -44,6 +45,7 @@ let | |||||
|
|
||||||
| stdenv = throw "Use effectiveStdenv instead"; | ||||||
| effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv; | ||||||
| inherit (cudaPackages) cuda_nvcc; | ||||||
|
|
||||||
| cudaArchitecturesString = cudaPackages.flags.cmakeCudaArchitecturesString; | ||||||
|
|
||||||
|
|
@@ -121,6 +123,7 @@ effectiveStdenv.mkDerivation rec { | |||||
| ++ lib.optionals cudaSupport [ | ||||||
| cudaPackages.cuda_nvcc | ||||||
| cudaPackages.cudnn-frontend | ||||||
| removeReferencesTo | ||||||
| ] | ||||||
| ++ lib.optionals isCudaJetson [ | ||||||
| cudaPackages.autoAddCudaCompatRunpath | ||||||
|
|
@@ -318,6 +321,12 @@ effectiveStdenv.mkDerivation rec { | |||||
| ../include/onnxruntime/core/session/onnxruntime_*.h | ||||||
| ''; | ||||||
|
|
||||||
| # See comments in `cudaPackages.nccl` | ||||||
| postFixup = lib.optionalString cudaSupport '' | ||||||
| remove-references-to -t "${lib.getBin cuda_nvcc}" ''${!outputLib}/lib/libonnxruntime_providers_cuda.so | ||||||
| ''; | ||||||
| disallowedRequisites = [ (lib.getBin cuda_nvcc) ]; | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't it be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @matdibu no, the irony is that evaluating
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, that makes sense, thank you!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
|
||||||
| passthru = { | ||||||
| inherit cudaSupport cudaPackages ncclSupport; # for the python module | ||||||
| inherit protobuf; | ||||||
|
|
||||||
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.
Omit this 1 because we already found where it comes from. Well to some precision...
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.
Wdym? This patch is necessary to get rid of nvcc, otherwise:
Uh oh!
There was an error while loading. Please reload this page.
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.
Any idea why NVCC is doing this now?
Is it possible it's a result of my making NVCC a single output? As in, whereas previously references were to a distinct
lib,include, orbinoutput and Nix's closure scanning would keep those dependencies, but not thedevoutput which contained the setup hook?EDIT: In particular, I'm concerned the dependency on NVCC is not some quirk of ONNX Runtime's build system or packaging, but rather an issue with the way NVCC is packaged or used in Nixpkgs, and that we'll see such a dependency on many pacakges built with NVCC. What are your thoughts?
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.
No it shouldn't, not with the other PR?
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.
Considered in the other thread, inclined to reject because the outputs were
[ "out" "static" ], nodevand noincludeThere 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.
And then 100% reject after Gaetan finished bisection and found that the regression happened after merging
12.4 -> 12.8