Add regulus-rb-usb / regulus-ra-usb target device support - #6
Conversation
qbruntime 1.4 accepts the board name as the first positional argument to
Accelerator and adds two USB variants ("regulus-ra-usb", "regulus-rb-usb").
Extend the dispatch table, backend supported-devices tuples, and validation
set to expose the new boards, and forward the resolved target_device string
to Accelerator so USB and PCIe workloads reach their intended hardware.
Bumps mobilint-qb-runtime>=1.4.0 because the new Accelerator signature is
not backwards compatible with older releases.
|
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0553a5931d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
_resolve_targets hardcoded Aries's 2×4 grid when both target_cores and target_clusters were absent. Model Zoo's MobilintConfigMixin runs the config-layer normalization before the concrete backend __init__ can populate its own default, so a Regulus config that named only target_device was filled with eight Aries cores and then rejected by MobilintRegulusBackend's one-core validation. The failure pre-dated regulus-rb-usb but blocks the new target from being usable end-to-end from Model Zoo. Add _topology_for_target and thread target_device through NPUTargetSpec.from_kwargs, _resolve_targets, and NPUTargetSpecPending (baseline / from_baseline / finalize). Backend __init__ and the _spec promotion path forward self.target_device so setter-chain finalizes see the same board as the config load. Aries and unspecified callers still receive the historical 2×4 grid. Tests cover both entry points (direct from_kwargs and end-to-end backend construction) for every Regulus variant and the Aries fallback.
Codex review on PR #6 flagged .agents/skills/mblt-npu/SKILL.md as out of sync with the supported-board / runtime-dependency changes; the documentation-synchronization rule in AGENTS.md requires updating the skill for either category. Record the USB identifiers, the qbruntime>=1.4 floor, and the board-aware dev_no sugar rule so the runtime guidance matches the backend, README, and agent guide.
|
Codex P1 addressed in 1ca5487: |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ca5487f1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex P2 on PR #6: NPUTargetSpec.from_kwargs stored target_device only on the transient normalization scope, not on the returned spec. A follow-up spec._with(dev_no=...) constructed a fresh NPUTargetSpecPending with target_device=None, so the sugar re-expansion in finalize produced Aries's 2×4 grid — and passing the derived spec to MobilintRegulusBackend then failed its sole-core validation. Carry target_device as a metadata field on NPUTargetSpec (excluded from equality/hash/repr so canonical identity is unchanged), thread it through from_kwargs and finalize, and default NPUTargetSpecPending.from_baseline to the baseline spec's board so specs constructed outside the backend still keep their topology when derived.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Ships the qbruntime-1.4 USB target-device support (regulus-ra-usb, regulus-rb-usb), the target_device-aware NPUTargetSpec sugar expansion, and the associated qbruntime>=1.4.0 dependency floor.
Summary
regulus-ra-usbandregulus-rb-usbinBACKEND_CLASSES,normalize_target_device, and thesupported_target_devicestuples on the base and Regulus backends so callers can select the new qbruntime 1.4 USB variants without touching the runtime directly.target_devicestring as the first positional argument toqbruntime.Accelerator, matching the v1.4 signature that selects the physical device from the board name. Without this, USB and Regulus PCIe workloads silently landed on the default accelerator.target_deviceintoNPUTargetSpec.from_kwargs/NPUTargetSpecPending.finalizevia a new_topology_for_targethelper.dev_nosugar previously produced Aries's 2×4 grid regardless of board, so a Model Zoo config that named onlytarget_device="regulus-*"was filled with eight Aries cores and then rejected byMobilintRegulusBackend. Every Regulus variant now expands to its soled:0:0core; Aries and unspecified callers keep the historical 8-core default.mobilint-qb-runtime>=1.4.0— the newAccelerator(target_device, dev_no)signature is not backwards compatible with older releases.AGENTS.mdsupported-board list, note the qbruntime floor, and pin the target-device-aware sugar rule so future spec entry points inherit it.Test plan
python -m pytest tests/— 80 passed (extendedtest_target_device.pywith USB parametrizations, an Accelerator-signature check, directNPUTargetSpec.from_kwargssugar tests for every Regulus variant plus the Aries fallback, and Regulus-via-backend sugar tests; updated_FakeAcceleratorintests/test_npu_backend_multi_slot.pyto the two-argument constructor).python -m ruff check mblt_npu/ tests/_TargetDeviceConfig(target_device="regulus-rb-usb")now returnsMobilintRegulusBackendwithtarget_cores=["0:0:0"]; the default (notarget_device) still resolves toMobilintAriesBackend.