We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fe7f76 commit fc00d22Copy full SHA for fc00d22
1 file changed
csrc/deep_ep.cpp
@@ -139,15 +139,11 @@ Buffer::Buffer(int rank,
139
num_ranks(num_ranks),
140
num_nvl_bytes(num_nvl_bytes),
141
num_rdma_bytes(num_rdma_bytes),
142
- device_id([&]() {
143
- int id = -1;
144
- CUDA_CHECK(cudaGetDevice(&id));
145
- return id;
146
- }()),
147
enable_shrink(enable_shrink),
148
low_latency_mode(low_latency_mode),
149
explicitly_destroy(explicitly_destroy),
150
comm_stream([&]() {
+ CUDA_CHECK(cudaGetDevice(&device_id));
151
auto map = paddle::distributed::ProcessGroupMapFromGid::getInstance();
152
paddle::distributed::ProcessGroup* pg = map->get(context_ring_id);
153
const auto& place = phi::GPUPlace(device_id);
0 commit comments