feat: support NCCL on Iluvatar#49
Merged
Merged
Conversation
…common constructs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add NCCL backend support for Iluvatar by reusing the shared NCCL CCL abstraction introduced in the current codebase. This PR adds the Iluvatar NCCL provider alias, marks
BackendType::kNcclwithDevice::Type::kIluvataras a supported backend/device combination, and updates CMake so NCCL can be discovered and required for either NVIDIA or Iluvatar builds.This keeps the platform/backend separation intact: Iluvatar does not duplicate NCCL operation implementations, and it can use the existing
src/backends/ccl/ncclimplementation through a small provider-specificapi.h.Changes
Iluvatar NCCL Provider
src/backends/ccl/nccl/iluvatar/api.h.CclApi<BackendType::kNccl, Device::Type::kIluvatar>toNcclApi<Device::Type::kIluvatar>.Backend/device support
src/backend_device_map.hsoBackendType::kNcclis accepted withDevice::Type::kIluvatar.CMake detection and linking
WITH_NVIDIAorWITH_ILUVATARis enabled./usr/local/corexfor Iluvatar builds.WITH_NCCLrequirement so NCCL accepts NVIDIA or Iluvatar GPU support.NCCL_LIBwhenWITH_NCCLis enabled, so NCCL symbols are available to example targets.Platform and Backend Affected
Platform
Backend
Performance Impact
N/A..
Known Issues & Future Work
NcclApiimplementation. If Iluvatar NCCL later diverges from NVIDIA NCCL for specific APIs or semantics, follow-up work can override only the divergent pieces undersrc/backends/ccl/nccl/iluvatar.Test Results
Test Involved Platform
Test Involved Backend
Iluvatar with NCCL:
ccl_all_reduce.log
Iluvatar with NCCL+OpenMPI:
ccl_mpi_hybrid_all_reduce.log
NVIDIA with NCCL:
ccl_all_reduce.log
NVIDIA with NCCL+OpenMPI:
ccl_mpi_hybrid_all_reduce.log
Checklist
Title, Branch, and Commits
feat: …,fix(nccl): …).<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens (seeCONTRIBUTING.md§Branches).CONTRIBUTING.md§Pull Requests).master— the branch is rebased cleanly on top of the currentmaster.fixup!/squash!/wipcommits remain.Scope and Design
CONTRIBUTING.md§Code/General).printf/std::cout/print(...)left behind, orTODOwithout an owner and issue link.General Code Hygiene
CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).the `AllReduce` implementation) (CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General; §Python).C++ Specific (if C++ files changed)
clang-format(version 16, per.github/workflows/clang-format.yml) has been run against all modified applicable files; the diff is clean.assertwith messages that include at least__FILE__,__LINE__, and__func__(CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).Python Specific (if Python files changed)
Testing
Build, CI, and Tooling
CMakeLists.txtunderif(AUTO_DETECT_DEVICES)or toif(AUTO_DETECT_BACKENDS)if applicable.clang-format.yml,ruff.yml) are green locally (or expected to be green on CI).Documentation
README.md,CONTRIBUTING.md, or inline docs updated when behavior, build flags, or developer workflow changed.!orBREAKING CHANGE:footer.Security and Safety