MoonshotAI / MoonshotAI/checkpoint-engine
Validate HcclCommConfig size against CANN/HCCL headers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 107
- Avg merge
- 7d 13h
- Merged PRs (30d)
- 3
Description
Summary
checkpoint_engine/distributed/vllm_hccl.py defines HcclCommConfig as a Python ctypes.Structure and passes size=312 when creating sub-communicators. The current Python structure has a larger ctypes.sizeof(...) than 312, but it is not clear whether HCCL expects the full Python mirror or a 312-byte prefix for the CANN/HCCL version this project targets.
Why this matters
If the size field is meant to match the exact C struct size, passing 312 could make the HCCL side reject the config or ignore/misread trailing fields. If 312 intentionally matches an older/prefix ABI, the Python fields after that boundary should be documented or adjusted to avoid future accidental changes.
Suggested validation
- Compare the Python
HcclCommConfiglayout with the exact CANN/HCCL header version used by supported deployments. - Confirm whether
size=312is intentional. - If intentional, document why the Python struct may be larger than the advertised size.
- If not intentional, update the struct or derive
sizefrom the validated layout.
Related context
PR #92 fixes misspelled HCCL field names but intentionally does not change the size field because this needs ABI validation against the target HCCL headers.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in checkpoint_engine/distributed/vllm_hccl.py and inspect HcclCommConfig, its ctypes layout, and the hard-coded size=312. Compare that layout with the exact CANN/HCCL headers used by supported deployments, considering the context from PR #92. Done means confirming whether 312 is intentional and documenting it, or updating the structure or size handling to match the validated ABI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100