Skip to content
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

Cherry-picks for 1.9.x-aws #385

Merged
merged 3 commits into from
Apr 11, 2024
Merged

Cherry-picks for 1.9.x-aws #385

merged 3 commits into from
Apr 11, 2024

Conversation

rajachan
Copy link
Member

2cebf50 cuda: Tie libcuda check and tests
ea2f19b Add -lm to library list for plugins
1475da5 Add libpthread to library list

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Add libpthread to the library list, so it will be directly linked in
both the net plugin and executables.  The plugin uses pthreads, so
should have been including this by default.  We got lucky because
the pthread calls were in something we were building as a .so and
not in the unit tests.  But breaking that in a future commit breaks
the getting lucky part of the equation.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
(cherry picked from commit 53d1e90)
The tuner uses the log2 function that is defined in libm, but we
were relying on someone else to pull in libm, which is technically
wrong.  Checking for what library provides libm fixes this issue,
with the side effect of adding a -lm to the link line for the
libnccl-net plugin.  This is not strictly needed, but linkers also
will do the right thing most of the time and not actually include
that dependency in the list of libraries that must be loaded for
the plugin.  So this is a lot less configure code compared to
each plugin having its own LIBS list, for the same outcome.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
(cherry picked from commit 5a27309)
The plugins don't have a link-time dependency on libcuda.so, so
only check for the library if we actually need it (ie, we're building
the functional tests).  This works around a problem building on
containers, where it's likely that the libcuda.so library is either
not there or stubbed out (to be pulled up from the base AMI later).

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
@rajachan rajachan marked this pull request as ready for review April 11, 2024 17:41
@rajachan rajachan requested a review from bwbarrett as a code owner April 11, 2024 17:41
@rajachan rajachan added the BuildTriggerRequest CI build will be triggered when this label is set label Apr 11, 2024
@rajachan rajachan merged commit b9c46d2 into aws:v1.9.x-aws Apr 11, 2024
13 checks passed
@rajachan rajachan deleted the 191-cpicks branch April 11, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BuildTriggerRequest CI build will be triggered when this label is set
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants