Skip to content

Add: expose device-wide HBM information - #2011

Open
ChaoZheng109 wants to merge 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:feat/expose-device-memory-info
Open

Add: expose device-wide HBM information#2011
ChaoZheng109 wants to merge 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:feat/expose-device-memory-info

Conversation

@ChaoZheng109

Copy link
Copy Markdown
Collaborator

Summary

  • add Worker.device_memory_info(worker_id=0) with a structured, unpackable DeviceMemoryInfo
  • query device-wide HBM through aclrtGetMemInfo(ACL_HBM_MEM) in the target chip worker while keeping committed_device_memory() separate
  • route L2 and local L3 queries through the existing lifecycle and control-ordering paths; report simulator backends as unsupported
  • cover both runtimes and execution levels, logical worker routing, lifecycle behavior, and direct ACL comparison on hardware

Testing

  • pre-commit run
  • targeted Python unit tests: 10 passed
  • a2a3 hardware tests: 4 passed
  • full a2a3sim and a5sim scene sweeps
  • C++ CTest suite; the socket test also passed outside the sandbox

Fixes #1878

Add an aclrtGetMemInfo-backed Worker query for L2 and local L3 workers, with a structured and unpackable free/total result. Keep allocator committed-memory accounting as its separate existing API and report simulator support explicitly.

Cover both runtimes and platforms in sim, validate logical worker routing and control ordering, and compare onboard results with the direct ACL query.

Fixes hw-native-sys#1878
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 37 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e615ac06-4217-4f0d-bf1f-52ae99e9e261

📥 Commits

Reviewing files that changed from the base of the PR and between 1761c75 and b9409bc.

📒 Files selected for processing (17)
  • python/bindings/task_interface.cpp
  • python/bindings/worker_bind.h
  • python/simpler/orchestrator.py
  • python/simpler/task_interface.py
  • python/simpler/worker.py
  • src/common/hierarchical/orchestrator.cpp
  • src/common/hierarchical/orchestrator.h
  • src/common/hierarchical/worker_manager.cpp
  • src/common/hierarchical/worker_manager.h
  • src/common/platform/onboard/host/c_api_shared.cpp
  • src/common/platform/sim/host/c_api_shared.cpp
  • src/common/worker/chip_worker.cpp
  • src/common/worker/chip_worker.h
  • src/common/worker/device_memory_info.h
  • src/common/worker/runtime_c_api.h
  • tests/ut/py/test_worker/test_device_memory_info.py
  • tests/ut/py/test_worker/test_host_worker.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Expose device-wide HBM information through Worker

1 participant