Fix: scope A5 CPU topology fallback to x86 standard cards - #1552
Fix: scope A5 CPU topology fallback to x86 standard cards#1552sunkaixuan2018 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughA5 host topology probing now falls back to deriving non-SMT CPU metadata from the OCCUPY bitmap when CPU_TOPO is unsupported. Documentation and no-hardware unit tests cover topology derivation, affinity ordering, and empty masks. ChangesA5 CPU topology fallback
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/a5/platform/onboard/host/aicpu_topology_probe.cpp`:
- Around line 179-192: Restrict the OCCUPY fallback in
derive_topology_from_occupy to verified CPU_TOPO-capable drivers, or validate
each set host mask bit against the device-side user pool and SMT topology before
assigning phy_cpu_id and hyperthread_id. Update the corresponding
contract/documentation in src/a5/platform/onboard/host/aicpu_topology_probe.h
(lines 37-50) and src/a5/docs/hardware.md (lines 165-169) to state this
restriction; apply the implementation change at
src/a5/platform/onboard/host/aicpu_topology_probe.cpp (lines 179-192).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 818eba7d-e086-4c4a-8af3-fdf7e676487e
📒 Files selected for processing (5)
src/a5/docs/hardware.mdsrc/a5/platform/onboard/host/aicpu_topology_probe.cppsrc/a5/platform/onboard/host/aicpu_topology_probe.htests/ut/cpp/CMakeLists.txttests/ut/cpp/a5/test_aicpu_topology_fallback.cpp
2dfba39 to
a7c98f0
Compare
Use OCCUPY-derived topology only for the verified x86 Ascend950PR_9579 signature when CPU_TOPO is unavailable. Preserve the existing failure behavior for other hosts, SoCs, and masks, and cover both accepted and rejected signatures in the C++ regression test.
a7c98f0 to
ec408a3
Compare
Summary
OCCUPYfallback only whenCPU_TOPOis unavailable on the verified x86Ascend950PR_9579standard-card signature (OCCUPY=0x3e)CPU_TOPOpath unchangedTesting
git diff --check upstream/main...HEADAscend950PR_9579/OCCUPY=0x3eenvironment:test_a5_aicpu_topology_fallbackpassed and two-device onephase AllReduce passed in 15.11s