Skip to content

Commit 95a2b5f

Browse files
authored
fix mac build of sendrecvop_utils (#12272)
1 parent 2b2406e commit 95a2b5f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddle/fluid/operators/distributed/sendrecvop_utils.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ namespace distributed {
2828

2929
using VarMsg = sendrecv::VariableMessage;
3030

31+
#ifdef PADDLE_WITH_CUDA
3132
void* GetVarPayLoad(const std::string varname, int64_t size) {
3233
platform::CUDAPinnedPlace cuda_pinned;
3334
return memory::Alloc(cuda_pinned, size);
3435
}
36+
#endif
3537

3638
void GetTensorPayload(framework::Variable* var,
3739
const platform::DeviceContext& ctx, VarMsg* request,

0 commit comments

Comments
 (0)