Repository navigation
Conversation
📝 WalkthroughWalkthroughReplace NCCLHelper-based dynamic symbol loading with NCCLWindowAllocator-based implementation gated by NCCL 2.28+ runtime checks. Migrate API signatures from raw Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cpp/tensorrt_llm/common/ncclUtils.cpp`:
- Around line 225-245: The runtime check in NCCLWindowAllocator::requestBuffer
uses ncclGetVersion and wrongly targets NCCL 2.28.0; update the minimum required
version to 2.27.3 and, more importantly, remove hard references to symbols that
may not exist at link time (ncclMemAlloc, ncclCommWindowRegister) by resolving
them dynamically (dlopen + dlvsym/dlsym) or marking them weak so the shared
object can load on older libnccl; in practice update the version check to 2.27.3
in requestBuffer and implement late-binding for
ncclMemAlloc/ncclCommWindowRegister (or use weak symbol declarations) inside the
NCCLWindowAllocator so the code can gracefully fall back to regular tensors when
those symbols are absent rather than crashing at load time.
In `@cpp/tensorrt_llm/common/ncclUtils.h`:
- Around line 282-285: The constructor ScopedNCCLWindowBuffer currently
dereferences mComm when calling
NCCLWindowAllocator::getInstance().requestBuffer(*mComm, size), which can
segfault if the incoming std::shared_ptr<ncclComm_t> comm is null or points to a
null handle; update the constructor (and the similar helper in the 329-370
range) to first check that comm && *comm are valid, and only call requestBuffer
with *mComm when valid—otherwise set mBuffer to an empty/failed state or return
early so callers that treat a null comm as a normal failure continue to work
safely.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 807931b0-0046-4e70-a998-1112e4531bf9
📒 Files selected for processing (4)
cpp/tensorrt_llm/common/ncclUtils.cppcpp/tensorrt_llm/common/ncclUtils.hcpp/tensorrt_llm/thop/allreduceOp.cppcpp/tests/unit_tests/multi_gpu/ncclUtilsTest.cpp
…LWindowTensor Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
0362582 to
b0a827a
Compare
|
/bot run --disable-fail-fast --add-multigpu |
|
@Tabrizian is it OK to require a certain minimum NCCL version at run time? |
|
PR_Github #38194 Bot args parsing error: usage: /bot [-h] |
|
/bot run --disable-fail-fast |
|
PR_Github #38197 [ run ] triggered by Bot. Commit: |
|
PR_Github #38197 [ run ] completed with state
|
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38288 [ run ] triggered by Bot. Commit: |
|
PR_Github #38288 [ run ] completed with state
|
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38325 [ run ] triggered by Bot. Commit: |
|
PR_Github #38325 [ run ] completed with state
|
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38373 [ run ] triggered by Bot. Commit: |
|
PR_Github #38373 [ run ] completed with state
|
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38485 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38485 [ run ] completed with state
|
|
PR_Github #38491 [ run ] triggered by Bot. Commit: |
|
PR_Github #38491 [ run ] completed with state
|
|
/bot run --disable-fail-fast --add-multi-gpu-test |
|
PR_Github #38609 [ run ] triggered by Bot. Commit: |
|
PR_Github #38609 [ run ] completed with state |
…IDIA#12015) Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
…IDIA#12015) Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
Summary by CodeRabbit
New Features
Refactor
Chores
This also fixes: 5803120
Description
Symptom of mismatched NCCL versions at runtime was a segfault.
New behavior, graceful detection and skipping registering windows.
This PR enables stability of using NCCL symmetric related functions.
Test Coverage
Is covered in existing
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.