Skip to content

CPU: show heterogeneous RISC-V microarchitectures - #2566

Open
RevySR wants to merge 1 commit into
fastfetch-cli:devfrom
RevySR:riscv
Open

CPU: show heterogeneous RISC-V microarchitectures#2566
RevySR wants to merge 1 commit into
fastfetch-cli:devfrom
RevySR:riscv

Conversation

@RevySR

@RevySR RevySR commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Show a per-microarchitecture CPU breakdown on heterogeneous RISC-V systems, even when a SoC name has already been detected.

For example, the A210 contains four C908 and four C920 cores. Both clusters report the same maximum frequency, so frequency-based grouping alone does not distinguish them.

Related issue (required for new logos for new distros)

N/A

Changes

  • Parse and group per-CPU uarch descriptions from /proc/cpuinfo.
  • Preserve the SoC name and append counts for distinct microarchitectures.
  • Keep existing behavior for homogeneous systems and incomplete CPU descriptions.
  • Leave frequency reporting and the coreTypes interface unchanged.
  • Add tests for heterogeneous, interleaved, homogeneous, and malformed CPU descriptions.

Screenshots

Expected output:

image

Before:

CPU: a210 (8) @ 1.90 GHz

After:

CPU: a210 (4 x thead,c908 + 4 x thead,c920) (8) @ 1.90 GHz

Checklist

  • I have tested my changes locally.

Read all per-CPU uarch descriptions even when a SoC name is available.
Append a counted breakdown for heterogeneous systems while preserving
the existing display for homogeneous or incomplete descriptions.

Distinguish equal-frequency implementations such as A210 C908 and C920
without inferring performance/efficiency classes from their names.
Keep frequency reporting and the existing coreTypes interface unchanged.

Add tests for mixed, interleaved, homogeneous and malformed CPU descriptions,
including an unterminated final line and inconsistent online CPU counts.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
@CarterLi

CarterLi commented Sep 6, 2026

Copy link
Copy Markdown
Member

I don't like this. I think this is against fastfetch's design and it looks like an AI slop to me (I'm sorry if it isn't)

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.

2 participants