Skip to content

fix(native): Auto runs 4 threads on Pixel 6 and 7 - #77

Merged
rferrari merged 2 commits into
rferrari:fullnative-devfrom
bgrana75:fix/native-auto-threads
Oct 10, 2026
Merged

rferrari merged 2 commits into
rferrari:fullnative-devfrom
bgrana75:fix/native-auto-threads

Conversation

@bgrana75

Copy link
Copy Markdown

Auto runs 4 threads on Pixel 6 and 7

Builds on #76 (the CI job), so this PR's CI runs the engine tests; the last commit is this PR's.

CpuTopology.bigCores keeps only the fastest frequency group unless that group has a single core. On Tensor G1 and G2 (Pixel 6, 6a, 6 Pro, 7, 7a, 7 Pro: 2 X1 + 2 mid + 4 little cores) that leaves 2 cores, so Auto ran 2 threads there; llama.rn used 4. The X6 Pro and POCO F3 have one prime core, so they got 4 and couldn't show it. GrapheneOS runs only on Pixels.

Auto now uses a new CpuTopology.autoCores: the fastest frequency groups, adding the next group until there are 4 cores, but never the slowest group once there are 2. The slowest group is left out because every thread waits for the slowest one; on the X6, 6 and 8 threads halved generation.

Layout (little + mid + fast) Example Auto cores before Auto cores now Auto threads
4 + 2 + 2 Tensor G1/G2 (Pixel 6, 7) 2 4 2 → 4
4 + 3 + 1 Dimensity 8300 (X6), Snapdragon 870 (F3) 4 4 4
4 + 4 + 1 Tensor G3 (Pixel 8) 5 5 4
6 + 2 Helio G99 class 2 2 2
one cluster / unreadable all all 4
  • bigCores is unchanged, so the bench's "Big cores" option means what it did.
  • The manual threads and cores tweaks are unchanged; a user setting still wins (tested).
  • Tests: EngineTweaksTest, "Auto threads - 4 on the fast cores of every layout, never the little ones", with the per-core maximum frequencies of each chip.

Not measured. I haven't measured 2 vs 4 threads on a Tensor phone. Prompt reading should be faster with 4, as llama.rn ran it, but that needs a run on a Pixel 6 or 7. I haven't built this locally (no Android toolchain here); the CI job from #76 runs the tests. No CodeRabbit CLI review was run before pushing (cr isn't installed here).

CpuTopology.bigCores keeps only the fastest frequency group unless it has a single core. On Tensor
G1/G2 (2 X1 + 2 mid + 4 little) that's 2 cores, so Auto ran 2 threads there, where llama.rn used 4.

Auto now uses autoCores: the fastest groups, adding the next one until there are 4 cores, but never
the slowest group once there are 2 (little cores hold every thread back; 6 and 8 threads halved
generation on the X6). Tensor G1/G2 get their 2 + 2 fast cores; every other layout tested (Dimensity
8300, Snapdragon 870, Tensor G3, 2 big + 6 little, one cluster) gets the same cores as before.
bigCores is unchanged for the bench.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b332ae93-39a7-4bc7-8236-6060f2f8c190

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@rferrari

Copy link
Copy Markdown
Owner

Approve. autoCores is right on every layout in the test, and bigCores keeping its meaning
for the bench is right. On the Tensor G3 (4+4+1), Auto pins 4 threads to 5 cores; that's
fine. Still to measure: 2 vs 4 threads on a Pixel 6/7 (prefill and generation, battery
temperature at the start). That decides whether Auto stays at 4 there. This carries an
older copy of the CI job than #76, but it merges cleanly after #76.

@bgrana75

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rferrari
rferrari merged commit 610d61d into rferrari:fullnative-dev Oct 10, 2026
3 checks passed
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