Skip to content

Commit

Permalink
rm attr
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao1Han committed Oct 12, 2024
1 parent 1267963 commit 3d55b85
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <unordered_set>
#include <utility>

#include <ATen/detail/FunctionTraits.h>
#include <c10/core/DeviceType.h>
#include <c10/util/Optional.h>

Expand Down Expand Up @@ -242,10 +241,6 @@ c10::intrusive_ptr<Work> ProcessGroupXCCL::collective(
PreProcess pre,
PostProcess post,
OpType opType) {
using traits = function_traits<Fn>;
using attr_t = typename traits::template arg<2>::type;
attr_t attr = ccl::create_operation_attr<attr_t>();

auto device = inputs[0].device();
const auto key = std::to_string(device.index());
auto comm = getXCCLComm(key, device);
Expand All @@ -264,7 +259,7 @@ c10::intrusive_ptr<Work> ProcessGroupXCCL::collective(
for (const auto i : c10::irange(inputs.size())) {
c10::xpu::XPUCachingAllocator::recordStream(
inputs[i].storage().data_ptr(), stream);
fn(inputs[i], outputs[i], attr, *comm, stream);
fn(inputs[i], outputs[i], *comm, stream);
}
post(stream, work);

Expand Down Expand Up @@ -293,7 +288,6 @@ c10::intrusive_ptr<Work> ProcessGroupXCCL::allreduce(
tensor,
[&](at::Tensor& input,
at::Tensor& output,
ccl::allreduce_attr attr,
xcclComm_t& comm,
at::xpu::XPUStream& stream) {
auto xcclDataType = getXcclDataType(input.scalar_type(), true);
Expand All @@ -306,8 +300,7 @@ c10::intrusive_ptr<Work> ProcessGroupXCCL::allreduce(
xcclDataType,
xcclReduceOp,
comm,
ccl_stream,
attr);
ccl_stream);
return;
},
OpType::ALLREDUCE);
Expand Down

0 comments on commit 3d55b85

Please sign in to comment.