-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
CCache support for NVCC in CMake needs an upgrade. Tracked at #13459 |
@mxnet-label-bot add [CI, pr-awaiting-review] |
Ready for review. I will remove the Jenkinsfile changes when I'm done |
This reverts commit e8386a7.
# Later on, we have to override the links because underlying build systems ignore our compiler settings. Thus, | ||
# we have to give the process the proper permission to these files. This is hacky, but unfortunately | ||
# there's no better way to do this without patching all our submodules. | ||
chown -R jenkins_slave /usr/local/bin |
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.
Not clear, even with comment I don't understand why. Why can't we have some other folder added to the PATH?
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.
We do, that's why I created /tmp/ccache-redirects. The problem is that in some places (especially submodules), that paths have been hardcoded. That's why we have to do both :(
ln -s ccache /tmp/ccache-redirects/clang-5.0 | ||
ln -s ccache /tmp/ccache-redirects/clang++-6.0 | ||
ln -s ccache /tmp/ccache-redirects/clang-6.0 | ||
ln -s ccache /usr/local/bin/gcc |
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.
Why don't you set some other folder in the path????
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.
I did. But sometimes (in submodules) /usr/local/bin/gcc is referenced directly. In that case, my folder /tmp/ccache-redirects would be ignored.
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.
Which submodules? Shouldn't we better fix them? This seems hacky, even though is great that you got it to work.
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.
Ps-lite and ZeroMQ are the first ones that stuck to my mind. I didn't benchmark every single one.
In total, we spend about 5-8 minutes compiling submodules. After this PR it's 20 seconds.
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.
Have you tried export CXX and CC? I don't see any references to /usr/local/bin/gcc in our source tree.
Could you point out where in the build files is the problem? This still seems super hacky and fragile to me.
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 we used that method previously but zeromq ignored it for example. Have you searched for references to "GCC"? Zeromq is downloaded dynamically during the build (it's a zip file), so a grep would not find it.
Well that's the recommended way how ccache writes it in their guide. In the end, you can't control all build systems
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.
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
* Fix broken links * Make it idempotent fixes apache#13456 fixes apache#14117 fixes apache#11516
@josephevans please review, you said you got ccache to work with nvcc. |
This PR improves our ccache access. Particularly, we are now able to able to cache NVCC calls (which are super expensive) and also add caching to the compilation of submodules (especially ps-lites' submodule zeroMQ likes to hardcode its compilers).
Just to give some numbers:
Full NVCC Ccache support for CMake is blocked by #13459