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

TL/UCP: Allow self copy in allgather using network loopback #1021

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yaeliyac
Copy link

@yaeliyac yaeliyac commented Sep 19, 2024

What

Add option for self copy loopback in out of place start for allgather algorithms: knomial, ring, neighbor, sparbit

Why ?

When using UCC plugin for NCCL, using cuda_memcpy might cause deadlock

How ?

Add UCC_TL_UCP_ALLGATHER_USE_LOOPBACK flag to control this
Tested on ISRAEL-1 with multiple test cases - showed good results and same performance with and without loopback
image

@swx-jenkins3
Copy link

Can one of the admins verify this patch?

@yaeliyac yaeliyac closed this Nov 6, 2024
@yaeliyac yaeliyac reopened this Nov 6, 2024
@yaeliyac yaeliyac marked this pull request as ready for review November 18, 2024 15:39
@yaeliyac yaeliyac changed the title UCC plugin for NCCL - adjustments Allow self copy in allgather using network loopback Dec 11, 2024
@janjust janjust requested review from nsarka and janjust December 11, 2024 16:08
@Sergei-Lebedev
Copy link
Contributor

ok to test

src/components/cl/basic/cl_basic_context.c Outdated Show resolved Hide resolved
src/components/ec/cuda/ec_cuda_executor.c Outdated Show resolved Hide resolved
src/components/ec/cuda/ec_cuda_executor.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_neighbor.c Outdated Show resolved Hide resolved
src/components/tl/ucp/tl_ucp.c Outdated Show resolved Hide resolved
@samnordmann samnordmann self-requested a review December 13, 2024 12:35
@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 3 times, most recently from 482006f to eecdebf Compare December 13, 2024 15:28
@janjust
Copy link
Collaborator

janjust commented Dec 13, 2024

@Sergei-Lebedev why do we have to keep approving runs when force pushing?? Seems an outlier here

@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 3 times, most recently from 32b3ccd to b1c875b Compare December 15, 2024 11:49
@yaeliyac yaeliyac changed the title Allow self copy in allgather using network loopback TL/UCP: Allow self copy in allgather using network loopback Dec 15, 2024
@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 3 times, most recently from 2dc74f3 to a2c5fee Compare December 15, 2024 16:18
Copy link
Collaborator

@samnordmann samnordmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! It Looks good, I left a bunch of comments mainly on codestyle.

However, please add tests for that feature.

Also please note from the CI:

Commit title is too long: 59
Bad commit title: 'TL/UCP: Allow self copy in allgather using network loopback'

src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/tl_ucp.h Outdated Show resolved Hide resolved
src/components/tl/ucp/tl_ucp.c Outdated Show resolved Hide resolved
src/components/tl/ucp/tl_ucp.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_sparbit.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_sparbit.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_ring.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_ring.c Outdated Show resolved Hide resolved
@samnordmann
Copy link
Collaborator

@yaeliyac btw, for knomial inplace, we don't expect any change, right? Do we have an explanation for the degradation in the graph?

@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 2 times, most recently from 6cb2e0e to 5ba0039 Compare December 16, 2024 14:17
src/components/tl/ucp/allgather/allgather_knomial.c Outdated Show resolved Hide resolved
src/components/tl/ucp/tl_ucp.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather.c Outdated Show resolved Hide resolved
src/components/tl/ucp/allgather/allgather_sparbit.c Outdated Show resolved Hide resolved
@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 2 times, most recently from 5619791 to caa90f8 Compare December 22, 2024 16:08
src/components/tl/ucp/allgather/allgather_bruck.c Outdated Show resolved Hide resolved
ucc_coll_args_t *args = &TASK_ARGS(task);
ucc_tl_ucp_team_t *team = TASK_TEAM(task);
ucc_kn_radix_t radix = task->allgather_kn.p.radix;
ucc_tl_ucp_task_t * task = ucc_derived_of(coll_task, ucc_tl_ucp_task_t);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion is not to reformat existing code (* symbol), because clang format formats different depending on version, so it is better to leave as before. @samnordmann @Sergei-Lebedev what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, clang format often does this undesirable reformatting... We should have a long-term fix -- in the meantime I suggest to manually place the "*" where they should

@yaeliyac yaeliyac force-pushed the origin/for_plugin branch 5 times, most recently from a353504 to b6d4812 Compare January 8, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants