未验证 提交 bddeecd1 编写于 作者: G Galaxy1458 提交者: GitHub

test,test=develop (#53301)

上级 336bc20b
...@@ -59,20 +59,20 @@ class ProcessGroup { ...@@ -59,20 +59,20 @@ class ProcessGroup {
virtual ~Task() = default; virtual ~Task() = default;
virtual bool IsCompleted(); virtual bool IsCompleted();
virtual bool Wait(std::chrono::milliseconds timeout = kWaitTimeout) { virtual bool Wait(std::chrono::milliseconds timeout UNUSED = kWaitTimeout) {
return false; return false;
} }
virtual void Synchronize() {} virtual void Synchronize() {}
virtual void UpdateWaitChain(const phi::DeviceContext& ctx) {} virtual void UpdateWaitChain(const phi::DeviceContext& ctx UNUSED) {}
bool IsSync() const { return sync_op_; } bool IsSync() const { return sync_op_; }
// TODO(sunyilun): methods below will be removed later // TODO(sunyilun): methods below will be removed later
Task(int rank, Task(int rank,
const std::vector<phi::DenseTensor>& inputs, const std::vector<phi::DenseTensor>& inputs UNUSED,
CommType comm_type) CommType comm_type)
: rank_(rank), comm_type_(comm_type) {} : rank_(rank), comm_type_(comm_type) {}
Task(int rank, Task(int rank,
const std::vector<phi::DenseTensor>& inputs, const std::vector<phi::DenseTensor>& inputs UNUSED,
CommType comm_type, CommType comm_type,
bool sync_op) bool sync_op)
: rank_(rank), comm_type_(comm_type), sync_op_(sync_op) {} : rank_(rank), comm_type_(comm_type), sync_op_(sync_op) {}
...@@ -97,14 +97,15 @@ class ProcessGroup { ...@@ -97,14 +97,15 @@ class ProcessGroup {
virtual std::string GetBackendName() const = 0; virtual std::string GetBackendName() const = 0;
virtual phi::DeviceContext* GetDeviceContext(const Place& place) const { virtual phi::DeviceContext* GetDeviceContext(
const Place& place UNUSED) const {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support get device_context.", "ProcessGroup%s does not support get device_context.",
GetBackendName())); GetBackendName()));
} }
virtual phi::DeviceContext* GetDeviceContext(const Place& place, virtual phi::DeviceContext* GetDeviceContext(
bool use_calc_stream) const { const Place& place UNUSED, bool use_calc_stream UNUSED) const {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support get device_context.", "ProcessGroup%s does not support get device_context.",
GetBackendName())); GetBackendName()));
...@@ -112,123 +113,127 @@ class ProcessGroup { ...@@ -112,123 +113,127 @@ class ProcessGroup {
// without stream APIs // without stream APIs
virtual std::shared_ptr<ProcessGroup::Task> AllGather( virtual std::shared_ptr<ProcessGroup::Task> AllGather(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support all_gather with sync_op flag.", "ProcessGroup%s does not support all_gather with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> AllGather( virtual std::shared_ptr<ProcessGroup::Task> AllGather(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
int64_t offset, int64_t offset UNUSED,
int64_t numel, int64_t numel UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support all_gather with sync_op flag.", "ProcessGroup%s does not support all_gather with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> AllReduce( virtual std::shared_ptr<ProcessGroup::Task> AllReduce(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const AllreduceOptions& opts, const AllreduceOptions& opts UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support all_reduce with sync_op flag.", "ProcessGroup%s does not support all_reduce with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> AllToAll( virtual std::shared_ptr<ProcessGroup::Task> AllToAll(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const std::vector<int64_t>& out_size_each_rank, const std::vector<int64_t>& out_size_each_rank UNUSED,
const std::vector<int64_t>& in_size_each_rank, const std::vector<int64_t>& in_size_each_rank UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support all_to_all with sync_op flag.", "ProcessGroup%s does not support all_to_all with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Barrier( virtual std::shared_ptr<ProcessGroup::Task> Barrier(
const BarrierOptions& = BarrierOptions()) { const BarrierOptions& UNUSED = BarrierOptions()) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support barrier.", GetBackendName())); "ProcessGroup%s does not support barrier.", GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Broadcast( virtual std::shared_ptr<ProcessGroup::Task> Broadcast(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const BroadcastOptions& opts, const BroadcastOptions& opts UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support broadcast with sync_op flag", "ProcessGroup%s does not support broadcast with sync_op flag",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Reduce( virtual std::shared_ptr<ProcessGroup::Task> Reduce(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ReduceOptions& opts, const ReduceOptions& opts UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support reduce with sync_op flag.", "ProcessGroup%s does not support reduce with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> ReduceScatter( virtual std::shared_ptr<ProcessGroup::Task> ReduceScatter(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ReduceScatterOptions& opts, const ReduceScatterOptions& opts UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support reduce_scatter with sync_op flag.", "ProcessGroup%s does not support reduce_scatter with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Scatter( virtual std::shared_ptr<ProcessGroup::Task> Scatter(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ScatterOptions& opts, const ScatterOptions& opts UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support scatter with sync_op flag.", "ProcessGroup%s does not support scatter with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor, virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor
int src_rank, UNUSED,
bool sync_op) { int src_rank UNUSED,
bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support recv with sync_op flag.", "ProcessGroup%s does not support recv with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor, virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor
int src_rank, UNUSED,
int64_t offset, int src_rank UNUSED,
int64_t numel, int64_t offset UNUSED,
bool sync_op) { int64_t numel UNUSED,
bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support recv with sync_op flag.", "ProcessGroup%s does not support recv with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Send( virtual std::shared_ptr<ProcessGroup::Task> Send(
const phi::DenseTensor& tensor, int dst_rank, bool sync_op) { const phi::DenseTensor& tensor UNUSED,
int dst_rank UNUSED,
bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support send with sync_op flag.", "ProcessGroup%s does not support send with sync_op flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Send( virtual std::shared_ptr<ProcessGroup::Task> Send(
const phi::DenseTensor& tensor, const phi::DenseTensor& tensor UNUSED,
int dst_rank, int dst_rank UNUSED,
int64_t offset, int64_t offset UNUSED,
int64_t numel, int64_t numel UNUSED,
bool sync_op) { bool sync_op UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support send with sync_op flag.", "ProcessGroup%s does not support send with sync_op flag.",
GetBackendName())); GetBackendName()));
...@@ -236,10 +241,10 @@ class ProcessGroup { ...@@ -236,10 +241,10 @@ class ProcessGroup {
// stream APIs // stream APIs
virtual std::shared_ptr<ProcessGroup::Task> AllGather( virtual std::shared_ptr<ProcessGroup::Task> AllGather(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support all_gather " phi::errors::Unimplemented("ProcessGroup%s does not support all_gather "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -247,12 +252,12 @@ class ProcessGroup { ...@@ -247,12 +252,12 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> AllGather( virtual std::shared_ptr<ProcessGroup::Task> AllGather(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
int64_t offset, int64_t offset UNUSED,
int64_t numel, int64_t numel UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support all_gather " phi::errors::Unimplemented("ProcessGroup%s does not support all_gather "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -260,11 +265,11 @@ class ProcessGroup { ...@@ -260,11 +265,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> AllReduce( virtual std::shared_ptr<ProcessGroup::Task> AllReduce(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const AllreduceOptions& opts, const AllreduceOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support all_reduce " phi::errors::Unimplemented("ProcessGroup%s does not support all_reduce "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -272,12 +277,12 @@ class ProcessGroup { ...@@ -272,12 +277,12 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> AllToAll( virtual std::shared_ptr<ProcessGroup::Task> AllToAll(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const std::vector<int64_t>& out_size_each_rank, const std::vector<int64_t>& out_size_each_rank UNUSED,
const std::vector<int64_t>& in_size_each_rank, const std::vector<int64_t>& in_size_each_rank UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support all_to_all " phi::errors::Unimplemented("ProcessGroup%s does not support all_to_all "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -285,11 +290,11 @@ class ProcessGroup { ...@@ -285,11 +290,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Broadcast( virtual std::shared_ptr<ProcessGroup::Task> Broadcast(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const BroadcastOptions& opts, const BroadcastOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support broadcast " phi::errors::Unimplemented("ProcessGroup%s does not support broadcast "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -297,11 +302,11 @@ class ProcessGroup { ...@@ -297,11 +302,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Reduce( virtual std::shared_ptr<ProcessGroup::Task> Reduce(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ReduceOptions& opts, const ReduceOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support reduce " phi::errors::Unimplemented("ProcessGroup%s does not support reduce "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -309,11 +314,11 @@ class ProcessGroup { ...@@ -309,11 +314,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> ReduceScatter( virtual std::shared_ptr<ProcessGroup::Task> ReduceScatter(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ReduceScatterOptions& opts, const ReduceScatterOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW(phi::errors::Unimplemented( PADDLE_THROW(phi::errors::Unimplemented(
"ProcessGroup%s does not support reduce_scatter " "ProcessGroup%s does not support reduce_scatter "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -321,11 +326,11 @@ class ProcessGroup { ...@@ -321,11 +326,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Scatter( virtual std::shared_ptr<ProcessGroup::Task> Scatter(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const ScatterOptions& opts, const ScatterOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support scatter " phi::errors::Unimplemented("ProcessGroup%s does not support scatter "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -333,11 +338,11 @@ class ProcessGroup { ...@@ -333,11 +338,11 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Gather( virtual std::shared_ptr<ProcessGroup::Task> Gather(
phi::DenseTensor* out_tensor, phi::DenseTensor* out_tensor UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const GatherOptions& opts, const GatherOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support gather " phi::errors::Unimplemented("ProcessGroup%s does not support gather "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -345,33 +350,35 @@ class ProcessGroup { ...@@ -345,33 +350,35 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Gather( virtual std::shared_ptr<ProcessGroup::Task> Gather(
std::vector<phi::DenseTensor>* gather_tensors_ptr, std::vector<phi::DenseTensor>* gather_tensors_ptr UNUSED,
const phi::DenseTensor& in_tensor, const phi::DenseTensor& in_tensor UNUSED,
const GatherOptions& opts, const GatherOptions& opts UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support gather " phi::errors::Unimplemented("ProcessGroup%s does not support gather "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor, virtual std::shared_ptr<ProcessGroup::Task> Recv(
int src_rank, phi::DenseTensor* tensor UNUSED,
bool sync_op, int src_rank UNUSED,
bool use_calc_stream) { bool sync_op UNUSED,
bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support recv with " phi::errors::Unimplemented("ProcessGroup%s does not support recv with "
"sync_op and use_calc_stream flag.", "sync_op and use_calc_stream flag.",
GetBackendName())); GetBackendName()));
} }
virtual std::shared_ptr<ProcessGroup::Task> Recv(phi::DenseTensor* tensor, virtual std::shared_ptr<ProcessGroup::Task> Recv(
int src_rank, phi::DenseTensor* tensor UNUSED,
int64_t offset, int src_rank UNUSED,
int64_t numel, int64_t offset UNUSED,
bool sync_op, int64_t numel UNUSED,
bool use_calc_stream) { bool sync_op UNUSED,
bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support recv " phi::errors::Unimplemented("ProcessGroup%s does not support recv "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -379,10 +386,10 @@ class ProcessGroup { ...@@ -379,10 +386,10 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Send( virtual std::shared_ptr<ProcessGroup::Task> Send(
const phi::DenseTensor& tensor, const phi::DenseTensor& tensor UNUSED,
int dst_rank, int dst_rank UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support send " phi::errors::Unimplemented("ProcessGroup%s does not support send "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -390,12 +397,12 @@ class ProcessGroup { ...@@ -390,12 +397,12 @@ class ProcessGroup {
} }
virtual std::shared_ptr<ProcessGroup::Task> Send( virtual std::shared_ptr<ProcessGroup::Task> Send(
const phi::DenseTensor& tensor, const phi::DenseTensor& tensor UNUSED,
int dst_rank, int dst_rank UNUSED,
int64_t offset, int64_t offset UNUSED,
int64_t numel, int64_t numel UNUSED,
bool sync_op, bool sync_op UNUSED,
bool use_calc_stream) { bool use_calc_stream UNUSED) {
PADDLE_THROW( PADDLE_THROW(
phi::errors::Unimplemented("ProcessGroup%s does not support send " phi::errors::Unimplemented("ProcessGroup%s does not support send "
"with sync_op and use_calc_stream flag.", "with sync_op and use_calc_stream flag.",
...@@ -407,7 +414,7 @@ class ProcessGroup { ...@@ -407,7 +414,7 @@ class ProcessGroup {
virtual std::shared_ptr<ProcessGroup::Task> AllReduce( virtual std::shared_ptr<ProcessGroup::Task> AllReduce(
std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT
std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT
const AllreduceOptions& = AllreduceOptions()) { const AllreduceOptions& UNUSED = AllreduceOptions()) {
PADDLE_THROW(phi::errors::InvalidArgument( PADDLE_THROW(phi::errors::InvalidArgument(
"ProcessGroup%s does not support allreduce", GetBackendName())); "ProcessGroup%s does not support allreduce", GetBackendName()));
} }
...@@ -415,7 +422,7 @@ class ProcessGroup { ...@@ -415,7 +422,7 @@ class ProcessGroup {
virtual std::shared_ptr<ProcessGroup::Task> AllReduce( virtual std::shared_ptr<ProcessGroup::Task> AllReduce(
std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT
std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT
const AllreduceOptions&, const AllreduceOptions& UNUSED,
bool) { bool) {
PADDLE_THROW(phi::errors::InvalidArgument( PADDLE_THROW(phi::errors::InvalidArgument(
"ProcessGroup%s does not support allreduce with sync_op flag", "ProcessGroup%s does not support allreduce with sync_op flag",
...@@ -426,7 +433,7 @@ class ProcessGroup { ...@@ -426,7 +433,7 @@ class ProcessGroup {
virtual std::shared_ptr<ProcessGroup::Task> Broadcast( virtual std::shared_ptr<ProcessGroup::Task> Broadcast(
std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT
std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT
const BroadcastOptions& = BroadcastOptions()) { const BroadcastOptions& UNUSED = BroadcastOptions()) {
PADDLE_THROW(phi::errors::InvalidArgument( PADDLE_THROW(phi::errors::InvalidArgument(
"ProcessGroup%s does not support broadcast", GetBackendName())); "ProcessGroup%s does not support broadcast", GetBackendName()));
} }
...@@ -434,7 +441,7 @@ class ProcessGroup { ...@@ -434,7 +441,7 @@ class ProcessGroup {
virtual std::shared_ptr<ProcessGroup::Task> Broadcast( virtual std::shared_ptr<ProcessGroup::Task> Broadcast(
std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT std::vector<phi::DenseTensor>& /* input tensors */, // NOLINT
std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT std::vector<phi::DenseTensor>& /* output tensors */, // NOLINT
const BroadcastOptions&, const BroadcastOptions& UNUSED,
bool) { bool) {
PADDLE_THROW(phi::errors::InvalidArgument( PADDLE_THROW(phi::errors::InvalidArgument(
"ProcessGroup%s does not support broadcast with sync_op flag", "ProcessGroup%s does not support broadcast with sync_op flag",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册