Repository navigation
feat: add T-Head platform support across runtime, device, build, and launcher stack - #78
Merged
Merged
Conversation
- Rename public Ali identifiers to T-Head - Prevent false NVIDIA auto-detection while preserving explicit NVIDIA selection.
Collect T-Head SDK hints lazily and reuse them across device, NCCL, and toolkit discovery. Keep NCCL search suffixes scoped to their platform-specific paths.
Use `thead` as the public device name and source-directory identifier, derive `kThead` through standard bridge generation, and remove the T-Head enum mapping. Also retain the memoized T-Head hints in function scope so first-use backend detection resolves SDK paths correctly.
35 of 56 tasks
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
Adds T-Head PPU support to InfiniCCL through its CUDA-compatible runtime and NCCL API surface. The branch introduces the public
theaddevice identifier andWITH_THEADbuild option, adds the corresponding device runtime and NCCL backend adapter, and wires the platform into CMake device and backend auto-detection. The implementation reuses the existing CUDA and NCCL abstractions.Changes
Build and Auto-Detection
WITH_THEADand lazy, memoized discovery of T-Head SDK locations from relevant environment variables;targets/x86_64-linux/{include,lib}search suffixes;Device and Backend Support
Device::Type::kTheadwith public device namethead.src/devices/thead/.src/backends/ccl/nccl/thead/and register NCCL as a supported backend/device combination.Launcher and Generated Dispatch
scripts/icclrun_logic.py.theaddirectory and device name, without a device-specific enum mapping inscripts/gen_bridge.py.Documentation and Template Updates
.github/pull_request_template.mdto include T-Head as a supported platform;README.mdto include T-Head as a supported platform.Platform and Backend Affected
Platform
Backend
Performance Impact
If applicable, provide benchmark results.
Known Issues & Future Work
_collect_thead_hintsinCMakeLists.txtis not ideal. An architecture should be designed to abstract out and organize platform/device-related utility functions instead of all residing in the rootCMakeLists.txt.Test Results
Test Involved Platform
Test Involved Backend
NVIDIA (OMPI+NCCL):
ccl_mpi_hybrid_all_gather.log
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log
HYGON (RCCL):
ccl_all_gather.log
ccl_all_reduce.log
ccl_send_recv.log
T-Head (OMPI + NCCL):
ccl_mpi_hybrid_all_gather.log
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log
T-Head (NCCL):
ccl_all_gather.log
ccl_all_reduce.log
ccl_send_recv.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)
ruff checkpasses cleanly on CI (see.github/workflows/ruff.yml).ruff format --checkpasses cleanly — if not, runruff formatand commit the result.CONTRIBUTING.md§Python).pytest.skipmessages without terminal period) are honored where applicable (CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).if,for, and similar control-flow statements (CONTRIBUTING.md§Python).return, except when it directly follows a control-flow statement (CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).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