mindspore-ai / mindspore-ai/hyper-parallel
CP modeling: unify device_per_node and bw_intra/bw_inter data sources (follow-up PR)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 53
- Forks
- 63
- Avg merge
- 23h 45m
- Merged PRs (30d)
- 63
Description
Follow-up from R29's review on the CP modeling PR. The three items below are deferred to separate fix/bug/feature PRs — they require deeper refactoring of the Device type and level_bandwidth semantics, which is out of scope for the current CP modeling review. Filing this issue to track them and address them together once the Device/level_bandwidth structure is fully understood.
1. Unify device_per_node source
device_per_node in cp_comm_layer_detailed and related paths should be derived from machine.device.intra_node_num() instead of the flat field on ccfg.
2. Recalibrate bw_intra / bw_inter dimensionality
ccfg.bw_intra = 400 and Device_A2.level_bandwidth[0] = 50 are not the same quantity:
level_bandwidth = [50, 10]is per-link physical bandwidth (introduced by ch-l in0f0e617a1/738c37f5a, theTypeabstraction treats it as per-link).ccfg.bw_intra = 400is the effective/aggregate bandwidth after 8-card HCCS aggregation (calibrated value).
Directly substituting one for the other would inflate intra-node CP communication time by ~8x and distort the search-space ranking. The level_bandwidth semantics (per-link vs aggregate) must be recalibrated before deciding whether to replace ccfg.bw_intra/bw_inter with values from level_bandwidth.
3. Consolidate the three bandwidth sources into a single source of truth
Currently there are three independent bandwidth sources:
- Production path:
cp_comm_layer_detailed→_cp_resolve_topologyreadsccfg.bw_intra / ccfg.bw_inter(flat fields, defaults 400 / 25). - Test path:
get_cp_topologyhardcodes 300 / 25. hardware.py:Device_A2.level_bandwidth = [50, 10].
Unifying these three into a single source of truth has impact beyond the CP modeling review scope, so it will be handled as a separate PR.
Dependency: Item (1) is a prerequisite for (2) and (3) — the device_per_node source must be unified first before the bandwidth dimensionality can be recalibrated and the sources consolidated. The three items will be addressed together in one follow-up PR.
schema_version: 1
source: gitcode
gitcode_repo: mindspore/hyper-parallel
gitcode_issue: 306
source_url: https://gitcode.com/mindspore/hyper-parallel/issues/306
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 by tracing device_per_node through cp_comm_layer_detailed and _cp_resolve_topology, then compare get_cp_topology with hardware.py's Device_A2.level_bandwidth. Read the Device, intra_node_num(), and level_bandwidth semantics before changing the bandwidth sources. Done means device_per_node is unified first, bandwidth dimensionality is recalibrated, and production, test, and hardware paths share one source of truth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100