[GH-ISSUE #74] test_internode.py hangs at internode.cu:dispatch(...) #68

Closed
opened 2026-10-26 09:53:39 +00:00 by bsakaguchi · 19 comments
Owner

Originally created by @yanminjia on GitHub (Mar 14, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/74

When I run test_internode.py on 2 nodes with 16 GPUs, it hang at the kernel function internode.cu:dispatch(...).

        // NVL consumers
        // Retrieve rank offset from barrier results (each lane's register stores an RDMA rank)
        int src_nvl_rank = target_rank, total_offset = 0;
        EP_STATIC_ASSERT(kNumRDMARanks <= 32, "Invalid number of RDMA peers");
        if (lane_id < kNumRDMARanks and lane_id * NUM_MAX_NVL_PEERS + src_nvl_rank > 0)
            total_offset = recv_gbl_rank_prefix_sum[lane_id * NUM_MAX_NVL_PEERS + src_nvl_rank - 1];

        // Receive channel offsets
        int start_offset = 0, end_offset = 0, num_tokens_to_recv;
        auto start_time = clock64();
        while (lane_id < kNumRDMARanks) {
            start_offset = ld_volatile_global(nvl_channel_prefix_start.buffer() + lane_id);
            end_offset = ld_volatile_global(nvl_channel_prefix_end.buffer() + lane_id);
            if (start_offset < 0 and end_offset < 0) {
                start_offset = -start_offset - 1, end_offset = -end_offset - 1;
                total_offset += start_offset;
                break;
            }

            // Timeout check
            if (clock64() - start_time > NUM_TIMEOUT_CYCLES) {
                printf("DeepEP dispatch NVL receiver timeout, channel: %d, RDMA: %d, nvl: %d, src RDMA: %d, src nvl: %d, start: %d, end: %d\n",
                       channel_id, rdma_rank, nvl_rank, lane_id, src_nvl_rank, start_offset, end_offset);
                trap();
            }
        }

And when reached the timeout (NUM_TIMEOUT_CYCLES), it crashed because trap() was called with following error messages:

[layout] Kernel performance: 0.049 ms

[testing] Running with BF16, without top-k (async=False, previous=False) ...DeepEP dispatch NVL receiver timeout, channel: 11, RDMA: 1, nvl: 2, src NVL: 3, head: 257, tail: 257, num_tokens_to_Recv: 12
DeepEP dispatch NVL receiver timeout, channel: 9, RDMA: 1, nvl: 2, src NVL: 1, head: 264, tail: 264, num_tokens_to_Recv: 3
DeepEP dispatch NVL receiver timeout, channel: 8, RDMA: 1, nvl: 2, src NVL: 7, head: 252, tail: 252, num_tokens_to_Recv: 14
terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Exception raised from c10_cuda_check_implementation at /opt/pytorch/pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x98 (0x7fb14a09c0a8 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0xe0 (0x7fb14a045b80 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x3c2 (0x7fb1a7faf832 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so)
frame #3: + 0x1bc9f (0x7fb1a7f76c9f in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so)
frame #4: + 0x1d58e (0x7fb1a7f7858e in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so)
frame #5: + 0x1d77c (0x7fb1a7f7877c in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so)
frame #6: + 0x53a3c0 (0x7fb19cfb03c0 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so)
frame #7: c10::TensorImpl::~TensorImpl() + 0x9 (0x7fb14a076179 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so)
frame #8: + 0x803098 (0x7fb19d279098 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so)
frame #9: THPVariable_subclass_dealloc(_object*) + 0x2a6 (0x7fb19d2793b6 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so)
frame #10: + 0x152ec0 (0x56129f2b6ec0 in /usr/bin/python3)
frame #11: + 0x166f68 (0x56129f2caf68 in /usr/bin/python3)
frame #12: + 0x166f95 (0x56129f2caf95 in /usr/bin/python3)
frame #13: + 0x166f95 (0x56129f2caf95 in /usr/bin/python3)
frame #14: + 0x173347 (0x56129f2d7347 in /usr/bin/python3)
frame #15: + 0x12e446 (0x56129f292446 in /usr/bin/python3)
frame #16: + 0x277707 (0x56129f3db707 in /usr/bin/python3)
frame #17: _PyEval_EvalFrameDefault + 0x5f98 (0x56129f2af1a8 in /usr/bin/python3)
frame #18: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3)
frame #19: _PyEval_EvalFrameDefault + 0x8ab (0x56129f2a9abb in /usr/bin/python3)
frame #20: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3)
frame #21: _PyEval_EvalFrameDefault + 0x6bc (0x56129f2a98cc in /usr/bin/python3)
frame #22: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3)
frame #23: _PyEval_EvalFrameDefault + 0x1983 (0x56129f2aab93 in /usr/bin/python3)
frame #24: + 0x142016 (0x56129f2a6016 in /usr/bin/python3)
frame #25: PyEval_EvalCode + 0x86 (0x56129f39b8b6 in /usr/bin/python3)
frame #26: + 0x262918 (0x56129f3c6918 in /usr/bin/python3)
frame #27: + 0x25c1db (0x56129f3c01db in /usr/bin/python3)
frame #28: PyRun_StringFlags + 0x81 (0x56129f3b9311 in /usr/bin/python3)
frame #29: PyRun_SimpleStringFlags + 0x41 (0x56129f3b91c1 in /usr/bin/python3)
frame #30: Py_RunMain + 0x375 (0x56129f3b8385 in /usr/bin/python3)
frame #31: Py_BytesMain + 0x2d (0x56129f38e70d in /usr/bin/python3)
frame #32: + 0x29d90 (0x7fb1a9719d90 in /lib/x86_64-linux-gnu/libc.so.6)
frame #33: __libc_start_main + 0x80 (0x7fb1a9719e40 in /lib/x86_64-linux-gnu/libc.so.6)
frame #34: _start + 0x25 (0x56129f38e605 in /usr/bin/python3)

It would be highly appreciated if any suggestion.

Many thanks.

Originally created by @yanminjia on GitHub (Mar 14, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/74 When I run test_internode.py on 2 nodes with 16 GPUs, it hang at the kernel function internode.cu:dispatch(...). ``` // NVL consumers // Retrieve rank offset from barrier results (each lane's register stores an RDMA rank) int src_nvl_rank = target_rank, total_offset = 0; EP_STATIC_ASSERT(kNumRDMARanks <= 32, "Invalid number of RDMA peers"); if (lane_id < kNumRDMARanks and lane_id * NUM_MAX_NVL_PEERS + src_nvl_rank > 0) total_offset = recv_gbl_rank_prefix_sum[lane_id * NUM_MAX_NVL_PEERS + src_nvl_rank - 1]; // Receive channel offsets int start_offset = 0, end_offset = 0, num_tokens_to_recv; auto start_time = clock64(); while (lane_id < kNumRDMARanks) { start_offset = ld_volatile_global(nvl_channel_prefix_start.buffer() + lane_id); end_offset = ld_volatile_global(nvl_channel_prefix_end.buffer() + lane_id); if (start_offset < 0 and end_offset < 0) { start_offset = -start_offset - 1, end_offset = -end_offset - 1; total_offset += start_offset; break; } // Timeout check if (clock64() - start_time > NUM_TIMEOUT_CYCLES) { printf("DeepEP dispatch NVL receiver timeout, channel: %d, RDMA: %d, nvl: %d, src RDMA: %d, src nvl: %d, start: %d, end: %d\n", channel_id, rdma_rank, nvl_rank, lane_id, src_nvl_rank, start_offset, end_offset); trap(); } } ``` And when reached the timeout (NUM_TIMEOUT_CYCLES), it crashed because trap() was called with following error messages: > [layout] Kernel performance: 0.049 ms > > [testing] Running with BF16, without top-k (async=False, previous=False) ...DeepEP dispatch NVL receiver timeout, channel: 11, RDMA: 1, nvl: 2, src NVL: 3, head: 257, tail: 257, num_tokens_to_Recv: 12 > DeepEP dispatch NVL receiver timeout, channel: 9, RDMA: 1, nvl: 2, src NVL: 1, head: 264, tail: 264, num_tokens_to_Recv: 3 > DeepEP dispatch NVL receiver timeout, channel: 8, RDMA: 1, nvl: 2, src NVL: 7, head: 252, tail: 252, num_tokens_to_Recv: 14 > terminate called after throwing an instance of 'c10::Error' > what(): CUDA error: unspecified launch failure > CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. > For debugging consider passing CUDA_LAUNCH_BLOCKING=1 > Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions. > > Exception raised from c10_cuda_check_implementation at /opt/pytorch/pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first): > frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x98 (0x7fb14a09c0a8 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so) > frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xe0 (0x7fb14a045b80 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so) > frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x3c2 (0x7fb1a7faf832 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so) > frame #3: <unknown function> + 0x1bc9f (0x7fb1a7f76c9f in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so) > frame #4: <unknown function> + 0x1d58e (0x7fb1a7f7858e in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so) > frame #5: <unknown function> + 0x1d77c (0x7fb1a7f7877c in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10_cuda.so) > frame #6: <unknown function> + 0x53a3c0 (0x7fb19cfb03c0 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so) > frame #7: c10::TensorImpl::~TensorImpl() + 0x9 (0x7fb14a076179 in /usr/local/lib/python3.10/dist-packages/torch/lib/libc10.so) > frame #8: <unknown function> + 0x803098 (0x7fb19d279098 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so) > frame #9: THPVariable_subclass_dealloc(_object*) + 0x2a6 (0x7fb19d2793b6 in /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_python.so) > frame #10: <unknown function> + 0x152ec0 (0x56129f2b6ec0 in /usr/bin/python3) > frame #11: <unknown function> + 0x166f68 (0x56129f2caf68 in /usr/bin/python3) > frame #12: <unknown function> + 0x166f95 (0x56129f2caf95 in /usr/bin/python3) > frame #13: <unknown function> + 0x166f95 (0x56129f2caf95 in /usr/bin/python3) > frame #14: <unknown function> + 0x173347 (0x56129f2d7347 in /usr/bin/python3) > frame #15: <unknown function> + 0x12e446 (0x56129f292446 in /usr/bin/python3) > frame #16: <unknown function> + 0x277707 (0x56129f3db707 in /usr/bin/python3) > frame #17: _PyEval_EvalFrameDefault + 0x5f98 (0x56129f2af1a8 in /usr/bin/python3) > frame #18: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3) > frame #19: _PyEval_EvalFrameDefault + 0x8ab (0x56129f2a9abb in /usr/bin/python3) > frame #20: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3) > frame #21: _PyEval_EvalFrameDefault + 0x6bc (0x56129f2a98cc in /usr/bin/python3) > frame #22: _PyFunction_Vectorcall + 0x7c (0x56129f2c142c in /usr/bin/python3) > frame #23: _PyEval_EvalFrameDefault + 0x1983 (0x56129f2aab93 in /usr/bin/python3) > frame #24: <unknown function> + 0x142016 (0x56129f2a6016 in /usr/bin/python3) > frame #25: PyEval_EvalCode + 0x86 (0x56129f39b8b6 in /usr/bin/python3) > frame #26: <unknown function> + 0x262918 (0x56129f3c6918 in /usr/bin/python3) > frame #27: <unknown function> + 0x25c1db (0x56129f3c01db in /usr/bin/python3) > frame #28: PyRun_StringFlags + 0x81 (0x56129f3b9311 in /usr/bin/python3) > frame #29: PyRun_SimpleStringFlags + 0x41 (0x56129f3b91c1 in /usr/bin/python3) > frame #30: Py_RunMain + 0x375 (0x56129f3b8385 in /usr/bin/python3) > frame #31: Py_BytesMain + 0x2d (0x56129f38e70d in /usr/bin/python3) > frame #32: <unknown function> + 0x29d90 (0x7fb1a9719d90 in /lib/x86_64-linux-gnu/libc.so.6) > frame #33: __libc_start_main + 0x80 (0x7fb1a9719e40 in /lib/x86_64-linux-gnu/libc.so.6) > frame #34: _start + 0x25 (0x56129f38e605 in /usr/bin/python3) It would be highly appreciated if any suggestion. Many thanks.
Author
Owner

@LyricZhao commented on GitHub (Mar 14, 2025):

Which commit are you using? Can you try the latest one? Normal kernels have similar problems with adaptive routing (AR) enabled, and now AR is fully supported.

<!-- gh-comment-id:2724207179 --> @LyricZhao commented on GitHub (Mar 14, 2025): Which commit are you using? Can you try the latest one? Normal kernels have similar problems with adaptive routing (AR) enabled, and now AR is fully supported.
Author
Owner

@yanminjia commented on GitHub (Mar 14, 2025):

Which commit are you using? Can you try the latest one? Normal kernels have similar problems with adaptive routing (AR) enabled, and now AR is fully supported.

Many thanks for your response. We are using this commit.

Image

We are testing DeepEP over RoCE network. I'm not sure if the latest code fixed some kind of problem relevant to the RoCE. Anyway, will try the latest code.

<!-- gh-comment-id:2724300796 --> @yanminjia commented on GitHub (Mar 14, 2025): > Which commit are you using? Can you try the latest one? Normal kernels have similar problems with adaptive routing (AR) enabled, and now AR is fully supported. Many thanks for your response. We are using this commit. ![Image](https://github.com/user-attachments/assets/5fdbfc97-7be3-474c-a0f5-c6794500df8c) We are testing DeepEP over RoCE network. I'm not sure if the latest code fixed some kind of problem relevant to the RoCE. Anyway, will try the latest code.
Author
Owner

@yanminjia commented on GitHub (Mar 14, 2025):

Still cannot work with the latest code. It looks hanging at the same code. By the way, IBRC is used in nvshmem layer in my test case.

<!-- gh-comment-id:2724364385 --> @yanminjia commented on GitHub (Mar 14, 2025): Still cannot work with the latest code. It looks hanging at the same code. By the way, IBRC is used in nvshmem layer in my test case.
Author
Owner

@LyricZhao commented on GitHub (Mar 17, 2025):

@sphish Do you have some idea about RoCE?

<!-- gh-comment-id:2727792029 --> @LyricZhao commented on GitHub (Mar 17, 2025): @sphish Do you have some idea about RoCE?
Author
Owner

@sphish commented on GitHub (Mar 17, 2025):

Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine?

<!-- gh-comment-id:2727849264 --> @sphish commented on GitHub (Mar 17, 2025): Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine?
Author
Owner

@zhoumo02 commented on GitHub (Mar 18, 2025):

I have the same problem, I run test_internode.py on 4 nodes with 32 GPUs, the timeout occurred in combine in addition to dispatch. We also used the latest version with adaptive routing enabled, iommu=pt

Hang in dispatch:
DeepEP dispatch NVL receiver timeout, channel: 10, ROMA: 1, nvl: 1, src RDMA: 3, src nul: 8, start: 8, end: 8
DeepEP dispatch NVL receiver timeout, channel: 10, RDMA: 1, nvl: 5, src ROMA: 3, src nvl: 0, start: 8, end: 0
DeepEP dispatch NVL receiver timeout, channel: 6, RDMA: 1, nvl: 6, sre ROMA: 3, src nvl: 0, start: 0, end: 0

Hang in combine RDMA receiver:
DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 902, expect: 18
DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 898, expect: 14
DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 886, expect: 6
DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 903, expect: 19
DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 882, expect: 2

Hang in combine RDMA forwarder:
DeepEP combine formarder (WL check) timeout, chanel: 11, ROMA: 1, nvl: 7, src WL: 0, dst RDMA: 0, tail: 0, waiting: 1, total: 68, sub: 1, large: 4, expected: 0
DeepEP combine forwarder (NWL check) timeout, channel: 7, RDMA: 1, nvl: 7, src NVL: 8, dst RDMA: 0, tail: 8, waiting: 2, total: 78, sub: 2, large: 4, expected: 0
DepEP combine forwarder (WL check) timeout, channel: 4, RDMA: 1, nvl: 7, src NWL: 0, dst ROMA: 8, tail: 8, waiting: 1, total: 69, sub: 1, large: 4, expected: 1
DeepEP combine forwarder (WL check) timeout, channel: 4, ROMA: 1, nvl: 7, src WL: 0, dst RDMA: 0, tail: 0, waiting: 0, total: 69, sub: 0, large: 4 expected: 0

Any suggestions can offer?

Many thanks!

<!-- gh-comment-id:2733813330 --> @zhoumo02 commented on GitHub (Mar 18, 2025): I have the same problem, I run test_internode.py on 4 nodes with 32 GPUs, the timeout occurred in combine in addition to dispatch. We also used the latest version with adaptive routing enabled, iommu=pt Hang in dispatch: DeepEP dispatch NVL receiver timeout, channel: 10, ROMA: 1, nvl: 1, src RDMA: 3, src nul: 8, start: 8, end: 8 DeepEP dispatch NVL receiver timeout, channel: 10, RDMA: 1, nvl: 5, src ROMA: 3, src nvl: 0, start: 8, end: 0 DeepEP dispatch NVL receiver timeout, channel: 6, RDMA: 1, nvl: 6, sre ROMA: 3, src nvl: 0, start: 0, end: 0 Hang in combine RDMA receiver: DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 902, expect: 18 DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 898, expect: 14 DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 886, expect: 6 DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 903, expect: 19 DeepEP combine RDMA receiver timeout, channel: 8, RDMA: 3, nvl: 5, src RDMA: 3, tail: 0, waiting: 882, expect: 2 Hang in combine RDMA forwarder: DeepEP combine formarder (WL check) timeout, chanel: 11, ROMA: 1, nvl: 7, src WL: 0, dst RDMA: 0, tail: 0, waiting: 1, total: 68, sub: 1, large: 4, expected: 0 DeepEP combine forwarder (NWL check) timeout, channel: 7, RDMA: 1, nvl: 7, src NVL: 8, dst RDMA: 0, tail: 8, waiting: 2, total: 78, sub: 2, large: 4, expected: 0 DepEP combine forwarder (WL check) timeout, channel: 4, RDMA: 1, nvl: 7, src NWL: 0, dst ROMA: 8, tail: 8, waiting: 1, total: 69, sub: 1, large: 4, expected: 1 DeepEP combine forwarder (WL check) timeout, channel: 4, ROMA: 1, nvl: 7, src WL: 0, dst RDMA: 0, tail: 0, waiting: 0, total: 69, sub: 0, large: 4 expected: 0 Any suggestions can offer? Many thanks!
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

This appears to be related to some ordering issues. Could you try disabling adaptive routing to see if that resolves the problem? @zhoumo02

<!-- gh-comment-id:2735080701 --> @sphish commented on GitHub (Mar 19, 2025): This appears to be related to some ordering issues. Could you try disabling adaptive routing to see if that resolves the problem? @zhoumo02
Author
Owner

@zhoumo02 commented on GitHub (Mar 19, 2025):

Thanks!I will try @sphish

<!-- gh-comment-id:2735197287 --> @zhoumo02 commented on GitHub (Mar 19, 2025): Thanks!I will try @sphish
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine?

No. Adaptive routing is not available in our RoCE enironment. Additionally, SR-IOV and IOMMU are closed on the side of GPU server.

<!-- gh-comment-id:2735230580 --> @yanminjia commented on GitHub (Mar 19, 2025): > Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine? No. Adaptive routing is not available in our RoCE enironment. Additionally, SR-IOV and IOMMU are closed on the side of GPU server.
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine?

No. Adaptive routing is not available in our RoCE enironment. Additionally, SR-IOV and IOMMU are closed on the side of GPU server.

What GPUs and NICs are you using?

<!-- gh-comment-id:2735362852 --> @sphish commented on GitHub (Mar 19, 2025): > > Is adaptive routing enabled in your environment? Also, Are SR-IOV and IOMMU enabled on the host machine? > > No. Adaptive routing is not available in our RoCE enironment. Additionally, SR-IOV and IOMMU are closed on the side of GPU server. What GPUs and NICs are you using?
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

GPU: H100
RNIC: dual-port ConnectX-7

As you know, Only single-port RNIC is supported by IBRC in NVSHMEM code. We modified the NVSHMEM code to support dual-port RNIC in IBRC. Basically, RDMA RPs are built on the 2 ports of the dual-port RNIC. And the traffic is distributed to the RPs on the 2 ports of the dual-port RNIC. It looks this hanging problem is relavant to the AMO operation associated with the dual-port RNIC. We have a walk around solution - AMO WR is only applied to the QP when the WRs on the other port of dual-port RNIC are served by calling check_poll_avail(ep, WAIT_ALL) in ibrc.cc:nvshmemt_ibrc_amo(...). But we guess this extra latency would have some kind of impact on performance.

<!-- gh-comment-id:2735409430 --> @yanminjia commented on GitHub (Mar 19, 2025): GPU: H100 RNIC: dual-port ConnectX-7 As you know, Only single-port RNIC is supported by IBRC in NVSHMEM code. We modified the NVSHMEM code to support dual-port RNIC in IBRC. Basically, RDMA RPs are built on the 2 ports of the dual-port RNIC. And the traffic is distributed to the RPs on the 2 ports of the dual-port RNIC. It looks this hanging problem is relavant to the AMO operation associated with the dual-port RNIC. We have a walk around solution - AMO WR is only applied to the QP when the WRs on the other port of dual-port RNIC are served by calling check_poll_avail(ep, WAIT_ALL) in ibrc.cc:nvshmemt_ibrc_amo(...). But we guess this extra latency would have some kind of impact on performance.
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

I don't have experience with dual-port NICs. What is RP you mentioned? Also, would traffic of a single QP be distributed across both ports? If that's the case, this could indeed cause the bug you're experiencing. @yanminjia

GPU: H100 RNIC: dual-port ConnectX-7RNIC:

As you know, Only single-port RNIC is supported by IBRC in NVSHMEM code. We modified the NVSHMEM code to support dual-port RNIC in IBRC. Basically, RDMA RPs are built on the 2 ports of the dual-port RNIC. And the traffic is distributed to the RPs on the 2 ports of the dual-port RNIC. It looks this hanging problem is relavant to the AMO operation associated with the dual-port RNIC. We have a walk around solution - AMO WR is only applied to the QP when the WRs on the other port of dual-port RNIC are served by calling check_poll_avail(ep, WAIT_ALL) in ibrc.cc:nvshmemt_ibrc_amo(...). But we guess this extra latency would have some kind of impact on performance.

<!-- gh-comment-id:2735519635 --> @sphish commented on GitHub (Mar 19, 2025): I don't have experience with dual-port NICs. What is RP you mentioned? Also, would traffic of a single QP be distributed across both ports? If that's the case, this could indeed cause the bug you're experiencing. @yanminjia > GPU: H100 RNIC: dual-port ConnectX-7RNIC: > > As you know, Only single-port RNIC is supported by IBRC in NVSHMEM code. We modified the NVSHMEM code to support dual-port RNIC in IBRC. Basically, RDMA RPs are built on the 2 ports of the dual-port RNIC. And the traffic is distributed to the RPs on the 2 ports of the dual-port RNIC. It looks this hanging problem is relavant to the AMO operation associated with the dual-port RNIC. We have a walk around solution - AMO WR is only applied to the QP when the WRs on the other port of dual-port RNIC are served by calling check_poll_avail(ep, WAIT_ALL) in ibrc.cc:nvshmemt_ibrc_amo(...). But we guess this extra latency would have some kind of impact on performance.
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues.

<!-- gh-comment-id:2735523031 --> @sphish commented on GitHub (Mar 19, 2025): I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues.
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

I don't have experience with dual-port NICs. What is RP you mentioned? Also, would traffic of a single QP be distributed across both ports? If that's the case, this could indeed cause the bug you're experiencing. @yanminjia

Sorry for this typo. It's RDMA QP.

The traffic of a specific QP has no way to be distributed to both ports. We build 2 QPs on the 2 ports of the dual-port RNIC. And the traffic issued from the GPU corresponding to this dual-port RNIC is distributed to these 2 QPs to fully utilize the bandwidth provided by this dual-port RNIC.

<!-- gh-comment-id:2735588076 --> @yanminjia commented on GitHub (Mar 19, 2025): > I don't have experience with dual-port NICs. What is RP you mentioned? Also, would traffic of a single QP be distributed across both ports? If that's the case, this could indeed cause the bug you're experiencing. [@yanminjia](https://github.com/yanminjia) > Sorry for this typo. It's RDMA QP. The traffic of a specific QP has no way to be distributed to both ports. We build 2 QPs on the 2 ports of the dual-port RNIC. And the traffic issued from the GPU corresponding to this dual-port RNIC is distributed to these 2 QPs to fully utilize the bandwidth provided by this dual-port RNIC.
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues.

So, we need to created a seperate QP for AMO operation, right? @sphish

<!-- gh-comment-id:2735592216 --> @yanminjia commented on GitHub (Mar 19, 2025): > I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues. So, we need to created a seperate QP for AMO operation, right? @sphish
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues.

So, we need to created a seperate QP for AMO operation, right?@sphish

In the normal kernels, atomic operations are used to move buffer pointers, and you need to guarantee ordering between the atomic operation and the preceding put data operations. Therefore, isolating atomic operations to a separate QP isn't feasible.

I think a viable solution would be to partition our channels: assign all RDMA operations from half of the channels to one QP (one port), and all operations from the other half of the channels to another QP. This way, we maintain the necessary ordering while utilizing both ports.

<!-- gh-comment-id:2735642985 --> @sphish commented on GitHub (Mar 19, 2025): > > I think one solution would be to pin each QP's traffic to a specific port, which should prevent this ordering issues. > > So, we need to created a seperate QP for AMO operation, right?[@sphish](https://github.com/sphish) In the normal kernels, atomic operations are used to move buffer pointers, and you need to guarantee ordering between the atomic operation and the preceding put data operations. Therefore, isolating atomic operations to a separate QP isn't feasible. I think a viable solution would be to partition our channels: assign all RDMA operations from half of the channels to one QP (one port), and all operations from the other half of the channels to another QP. This way, we maintain the necessary ordering while utilizing both ports.
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

So the data and the associated amo operation from the same channel should go into the same QP. That could ensure the necessary ordering of RDMA and AMO operation, right?

<!-- gh-comment-id:2735805704 --> @yanminjia commented on GitHub (Mar 19, 2025): So the data and the associated amo operation from the same channel should go into the same QP. That could ensure the necessary ordering of RDMA and AMO operation, right?
Author
Owner

@sphish commented on GitHub (Mar 19, 2025):

So the data and the associated amo operation from the same channel should go into the same QP. That could ensure the necessary ordering of RDMA and AMO operation, right?

Yes

<!-- gh-comment-id:2735836700 --> @sphish commented on GitHub (Mar 19, 2025): > So the data and the associated amo operation from the same channel should go into the same QP. That could ensure the necessary ordering of RDMA and AMO operation, right? Yes
Author
Owner

@yanminjia commented on GitHub (Mar 19, 2025):

Many thanks for your kindly help! @sphish

<!-- gh-comment-id:2736157587 --> @yanminjia commented on GitHub (Mar 19, 2025): Many thanks for your kindly help! @sphish
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#68
No description provided.