mindspore-ai / mindspore-ai/hyper-parallel

CP modeling: unify device_per_node and bw_intra/bw_inter data sources (follow-up PR)

Open
#657 1 comment 0 reactions 0 assignees View on GitHub

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 in 0f0e617a1 / 738c37f5a, the Type abstraction treats it as per-link).
  • ccfg.bw_intra = 400 is 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_topology reads ccfg.bw_intra / ccfg.bw_inter (flat fields, defaults 400 / 25).
  • Test path: get_cp_topology hardcodes 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace device_per_node through cp_comm_layer_detailed and _cp_resolve_topology, then compare it with machine.device.intra_node_num() and the flat ccfg field. Read get_cp_topology and hardware.py to map the three bandwidth sources and confirm the per-link versus aggregate meaning of level_bandwidth. Done means the device count is unified and the production, test, and hardware bandwidth values have one consistent source and dimensionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.