File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
paddle/fluid/operators/collective Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ template <typename T>
2626class RecvOpV2CUDAKernel : public framework ::OpKernel<T> {
2727 public:
2828 void Compute (const framework::ExecutionContext &ctx) const override {
29+ #if defined(PADDLE_WITH_NCCL) && NCCL_VERSION_CODE >= 2703
2930 int rid = ctx.Attr <int >(" ring_id" );
3031 PADDLE_ENFORCE_GE (
3132 rid, 0 ,
@@ -44,7 +45,6 @@ class RecvOpV2CUDAKernel : public framework::OpKernel<T> {
4445 framework::proto::VarType::Type type =
4546 framework::proto::VarType::Type (data_type);
4647
47- #if defined(PADDLE_WITH_NCCL) && NCCL_VERSION_CODE >= 2703
4848 cudaStream_t stream = nullptr ;
4949 auto place = ctx.GetPlace ();
5050 auto comm = platform::NCCLCommContext::Instance ().Get (rid, place);
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ template <typename T>
2626class SendOpV2CUDAKernel : public framework ::OpKernel<T> {
2727 public:
2828 void Compute (const framework::ExecutionContext& ctx) const override {
29+ #if defined(PADDLE_WITH_NCCL) && NCCL_VERSION_CODE >= 2703
2930 auto x = ctx.Input <framework::LoDTensor>(" X" );
3031 int numel = x->numel ();
3132
@@ -42,7 +43,6 @@ class SendOpV2CUDAKernel : public framework::OpKernel<T> {
4243 " The peer (%d) for send_v2 op must be non-negative." , peer));
4344 cudaStream_t stream = nullptr ;
4445 auto place = ctx.GetPlace ();
45- #if defined(PADDLE_WITH_NCCL) && NCCL_VERSION_CODE >= 2703
4646 auto comm = platform::NCCLCommContext::Instance ().Get (rid, place);
4747 if (ctx.Attr <bool >(" use_calc_stream" )) {
4848 auto dev_ctx = platform::DeviceContextPool::Instance ().Get (place);
You can’t perform that action at this time.
0 commit comments