Skip to content

Commit 33049ea

Browse files
fix DeepEP with ON_INFER (#71701)
1 parent 9546815 commit 33049ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paddle/fluid/distributed/collective/deep_ep/deep_ep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ int Buffer::get_root_rdma_rank(bool global) const {
208208

209209
int Buffer::get_local_device_id() const { return device_id; }
210210

211-
#if !defined(PADDLE_ON_INFERENCE) && !defined(PADDLE_NO_PYTHON)
211+
#ifndef PADDLE_NO_PYTHON
212212
pybind11::bytearray Buffer::get_local_ipc_handle() const {
213213
return {ipc_handles[nvl_rank].reserved, CUDA_IPC_HANDLE_SIZE};
214214
}

paddle/fluid/distributed/collective/deep_ep/deep_ep.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#undef NDEBUG
2525
#endif
2626

27-
#if !defined(PADDLE_ON_INFERENCE) && !defined(PADDLE_NO_PYTHON)
27+
#ifndef PADDLE_NO_PYTHON
2828
#include <pybind11/pybind11.h>
2929
#include <pybind11/pytypes.h>
3030
#endif
@@ -122,7 +122,7 @@ struct Buffer {
122122

123123
int get_local_device_id() const;
124124

125-
#if !defined(PADDLE_ON_INFERENCE) && !defined(PADDLE_NO_PYTHON)
125+
#ifndef PADDLE_NO_PYTHON
126126
pybind11::bytearray get_local_ipc_handle() const;
127127

128128
pybind11::bytearray get_local_nvshmem_unique_id() const;

0 commit comments

Comments
 (0)