Fix Rebellions NPU detection with rbln SDK 2.0.x #105
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Rebellions NPU detection with rbln SDK 2.0.x
Summary
Fixes Rebellions NPU detection failure when using rbln SDK 2.0.x by correcting the type of the
npufield in JSON deserialization.Problem
all-smi fails to detect Rebellions NPUs on systems running rbln SDK 2.0.x, despite
rbln-stat/rbln-smiworking correctly. The tool runs without errors but shows no NPU devices.Root Cause
There is a type mismatch between all-smi's expected schema and the actual JSON output from rbln SDK 2.0.x:
all-smi expectation (
src/device/readers/rebellions.rs):Actual rbln-stat/rbln-smi 2.0.1 output:
{ "devices": [ { "npu": 0, "name": "RBLN-CA22", ... } // Returns integer ] }This type mismatch causes silent JSON deserialization failures in serde, preventing NPU detection.
Changes
Changed the
npufield type fromStringtou32in theRblnDevicestruct:struct RblnDevice { #[allow(dead_code)] - npu: String, + npu: u32, name: String, sid: String,This is a one-line fix that restores compatibility with current rbln SDK versions.
Testing
Tested on:
Before fix:
After fix:
All NPU metrics (temperature, power, memory, utilization) are correctly displayed.
Backward Compatibility
This fix ensures compatibility with rbln SDK 2.0.1 (September 2025), which is the current stable version. The change is minimal (single line) and aligns the code with the documented SDK behavior.
If older SDK versions used a different format, this could be addressed with custom deserialization to support both types,.