File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
paddle/fluid/distributed/collective/deep_ep Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 18
18
// https://github.com/deepseek-ai/DeepEP/blob/main/LICENSE
19
19
20
20
#include < cuda_runtime.h>
21
- #include < pybind11/functional.h>
22
21
#include < atomic>
23
22
#include < chrono>
24
23
#include < memory>
@@ -209,6 +208,7 @@ int Buffer::get_root_rdma_rank(bool global) const {
209
208
210
209
int Buffer::get_local_device_id () const { return device_id; }
211
210
211
+ #ifndef PADDLE_NO_PYTHON
212
212
pybind11::bytearray Buffer::get_local_ipc_handle () const {
213
213
return {ipc_handles[nvl_rank].reserved , CUDA_IPC_HANDLE_SIZE};
214
214
}
@@ -301,6 +301,7 @@ void Buffer::sync(
301
301
// Ready to use
302
302
available = true ;
303
303
}
304
+ #endif
304
305
305
306
std::tuple<deep_ep::detail::Tensor,
306
307
std::optional<deep_ep::detail::Tensor>,
Original file line number Diff line number Diff line change 24
24
#undef NDEBUG
25
25
#endif
26
26
27
+ #ifndef PADDLE_NO_PYTHON
27
28
#include < pybind11/pybind11.h>
28
29
#include < pybind11/pytypes.h>
30
+ #endif
31
+ #include < optional>
29
32
#include < tuple>
30
33
#include < vector>
31
34
#include " paddle/fluid/distributed/collective/deep_ep/include/types.h"
@@ -119,6 +122,7 @@ struct Buffer {
119
122
120
123
int get_local_device_id () const ;
121
124
125
+ #ifndef PADDLE_NO_PYTHON
122
126
pybind11::bytearray get_local_ipc_handle () const ;
123
127
124
128
pybind11::bytearray get_local_nvshmem_unique_id () const ;
@@ -127,6 +131,7 @@ struct Buffer {
127
131
const std::vector<std::optional<pybind11::bytearray>>&
128
132
all_gathered_handles,
129
133
const std::optional<pybind11::bytearray>& root_unique_id_opt);
134
+ #endif
130
135
131
136
std::tuple<deep_ep::detail::Tensor,
132
137
std::optional<deep_ep::detail::Tensor>,
You can’t perform that action at this time.
0 commit comments