Skip to content

Find NCCL2 debians in configure.py - #20155

Closed
jayfurmanek wants to merge 3184 commits into
tensorflow:masterfrom
jayfurmanek:nccl2-deb
Closed

jayfurmanek wants to merge 3184 commits into
tensorflow:masterfrom
jayfurmanek:nccl2-deb

Conversation

@jayfurmanek

Copy link
Copy Markdown
Contributor

The Tensorlfow configure doesn't work with NCCL2 when it is installed via the debians.
This PR adds code that will handle the following scenarios:

  • NCCL2 installed via unpacked .tar file and not listed in ldconfig
  • NCCL2 installed via unpacked .tar file and listed properly in ldconfig
  • NCCL2 installed via debian file and not listed in ldconfig
  • NCCL2 installed via debian file and listed properly in ldconfig

The debian places the lib and header in the system paths (/usr/lib/*-linux-gnu and /usr/include) and the license files are placed in /usr/share/ and gzipped, so third_party/nccl/nccl_configure.bzl had to change in order to be flexible enough to find those, but changes here were deliberately kept to a minimum.

This avoids having to add a new config option for the NCCL2 header location by assuming /usr as the install location when NCCL is installed via debian.

@qlzh727
qlzh727 requested review from chsigg and gunan June 20, 2018 21:43
@qlzh727 qlzh727 self-assigned this Jun 20, 2018
@qlzh727 qlzh727 added awaiting review Pull request awaiting review kokoro:run labels Jun 20, 2018
@qlzh727

qlzh727 commented Jul 2, 2018

Copy link
Copy Markdown
Member

@jayfurmanek Please resolve the merge conflict

@jayfurmanek

Copy link
Copy Markdown
Contributor Author

Sorry -I was out. Looking at this now.

@jayfurmanek

Copy link
Copy Markdown
Contributor Author

So the merge conflict was because some basic checking for the existence of the NCCL license was added recently. I added a check for the license for each of the scenarios listed in the description. I also reformatted a bit for consistency.

@jayfurmanek

jayfurmanek commented Jul 17, 2018 •

Copy link
Copy Markdown
Contributor Author

So, the license checking that caused the initial code conflict is now removed again, causing another conflict. I'm inclined to leave it in for this PR as this is attempting to be comprehensive. I'd like some feedback, however. With the move of using NCCL2 as the default, I think we want more comprehensive support in configure.py.
Any thoughts/preferences before I resolve the conflict?

@jayfurmanek

Copy link
Copy Markdown
Contributor Author

I resolved the conflict:

  • I already had the expanduser calls in there so ~home dirs should work
  • I left in the license checking

I think this PR improves NCCL2 configuration in configure.py, which is currently not that great.

gunan
gunan previously approved these changes Jul 25, 2018
@gunan gunan added awaiting testing (then merge) kokoro:force-run Tests on submitted change and removed awaiting review Pull request awaiting review labels Jul 25, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 25, 2018
@qlzh727 qlzh727 added the kokoro:force-run Tests on submitted change label Jul 27, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 27, 2018
@qlzh727 qlzh727 added the ready to pull PR ready for merge process label Jul 27, 2018
@qlzh727 qlzh727 added the kokoro:force-run Tests on submitted change label Aug 9, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Aug 9, 2018
@qlzh727 qlzh727 removed the ready to pull PR ready for merge process label Aug 10, 2018
@gunan gunan added the kokoro:force-run Tests on submitted change label Aug 14, 2018
@kokoro-team kokoro-team removed kokoro:force-run Tests on submitted change labels Aug 14, 2018
@jayfurmanek

Copy link
Copy Markdown
Contributor Author

I can't see the internal build failures here. Let me know if there is anything I can help with here to get this one going.

@gunan

gunan commented Aug 14, 2018

Copy link
Copy Markdown
Contributor

I think the problem is due to nccl path not having a meaningful default?

@jayfurmanek

jayfurmanek commented Aug 15, 2018 •

Copy link
Copy Markdown
Contributor Author

Well, when looking for libnccl.so.2 there are two scenarios:

  • ldconfig is properly set up and knows the location
    If ldconifg knows the location, this PR just retrieves it and continues. There is no need to prompt the user and therefore no need for a default.

  • ldconfig is not aware of nccl
    If ldconfig does not know the location, then the user is prompted and the default location is CUDA_TOOLKIT_PATH which should give us a good chance of finding libnccl assuming it was put in the proper location.

@gunan can you share any error messages from the internal builds?

@gunan

gunan commented Aug 20, 2018

Copy link
Copy Markdown
Contributor

The error messages I see are as early as configure script, unless we explicitly specify nccl locations, the configure script crashes and build fails. Currently, not sure how we resolve nccl location, but maybe @aaroey can weigh in.

@googlebot

Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@jayfurmanek

Copy link
Copy Markdown
Contributor Author

Dang, I updated my branch to resolve the merge conflicts and it now I have a ton of commits on PR. I'll close and reopen a new one and reference this.

@jayfurmanek

Copy link
Copy Markdown
Contributor Author

replaced with #22519

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.