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

Add distributed PointToPoint op send/recv/reduce/all2all/gather/scatter #1204

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

Chao1Han
Copy link
Contributor

@Chao1Han Chao1Han commented Dec 23, 2024

Motivation:

implement pointtopoint op send/recv/reduce/all2all/gather/scatter

work->future_->markCompleted(at::IValue(*work->outputs_));
return work;
} else {
at::xpu::OptionalXPUGuard gpuGuard(device);

Choose a reason for hiding this comment

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

Please add some comments to when work will be constructed in coalesced collective.

TORCH_CHECK(tensors.size() == 1, MULTI_DEVICE_ERROR_MSG);
// @lint-ignore CLANGTIDY
auto tensor = tensors.back();
check_xpu_single_tensor(tensor, true);

Choose a reason for hiding this comment

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

I think the name is already refined in your last PR. Please update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

(outputSplitsEqual ? outLen : outputSplitSizes[i] * outLen);
}
auto xcclDataType = getXcclDataType(output.scalar_type());
ccl::alltoallv(

Choose a reason for hiding this comment

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

alltoallv will not exsit in new oneCCL API. Please use send/recv pair for alltoallv.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do this as soon as the new API is ready.

auto device = outputTensors[0].device();
int64_t total_numel = 0;
for (const auto r : c10::irange(outputTensors.size())) {
check_xpu_single_tensor(outputTensors[r], true);

Choose a reason for hiding this comment

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

Refine the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Base automatically changed from chao/xccl2 to main January 8, 2025 05:58
@Chao1Han Chao1Han changed the title [wip] add p2p op Add distributed PointToPoint op send/recv/reduce/all2all/gather/scater Jan 8, 2025
@Chao1Han Chao1Han changed the title Add distributed PointToPoint op send/recv/reduce/all2all/gather/scater Add distributed PointToPoint op send/recv/reduce/all2all/gather/scatter Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants