Box icon indicating copy to clipboard operation
Box copied to clipboard

Npu acceleration for Tensor Cpu

Open furkannakk0 opened this issue 7 months ago • 14 comments

My pixel 9 runs llm on CPU or GPU. Is there any way to use on NPU?

furkannakk0 avatar Apr 22 '26 11:04 furkannakk0

My pixel 9 runs llm on CPU or GPU. Is there any way to use on NPU?

Which version of Android are you on exactly, and do you have AiCore installed?

jegly avatar Apr 22 '26 12:04 jegly

I'm using graphene os with Android 16 version sir. No AI core installed.

furkannakk0 avatar Apr 22 '26 12:04 furkannakk0

I'm using graphene os with Android 16 version sir. No AI core installed.

Ah, that may indeed be the problem. I suspect the reason NPU is grayed out or non-selectable for you is that you don't have AICore installed. You could install it; however, I'm unsure how well it would run with GrapheneOS—it may or may not work.

jegly avatar Apr 22 '26 12:04 jegly

Thank you sir for your reply.

furkannakk0 avatar Apr 22 '26 12:04 furkannakk0

Thank you sir for your reply.

NNAPI—Android's built-in Neural Networks API, which is part of AOSP—is present on GrapheneOS. In theory, it can delegate to the Pixel's Tensor NPU. I will be adding a tweak in the next release, and the NPU may work as a result. Currently, it is broken for everyone regardless of AICore. However, I believe you will still need AICore, as I don't think bare metal can communicate with the NPU without it."

jegly avatar Apr 22 '26 12:04 jegly

NPU/TPU now working

jegly avatar Apr 24 '26 06:04 jegly

Thank you sir for your work. AICore needed?

furkannakk0 avatar Apr 24 '26 15:04 furkannakk0

Image

installed AI core but it didn't work for me. Probably graphene os issue.

furkannakk0 avatar Apr 24 '26 16:04 furkannakk0

are you running the latest release ? do you see the TPU option ? it should automatically detect and use it

jegly avatar Apr 24 '26 23:04 jegly

Yes I'm running latest release. Npu option is available. But it is loading model with GPU. When I select npu, it gives tf_lite_aux not found error.

Image

furkannakk0 avatar Apr 25 '26 07:04 furkannakk0

I have merged an upstream bug fix, which will be included in the next release. Be sure to check out the new AI voice-to-voice mode and video mode—it's pretty impressive and should perform well on the Pixel 9. I recommend using Gemma4 E2B. Also, the NPU may now be recognized as a TPU.

jegly avatar Apr 25 '26 07:04 jegly

Yes I'm running latest release. Npu option is available. But it is loading model with GPU. When I select npu, it gives tf_lite_aux not found error. Image

Give it a try now—it should automatically detect! If not, manually set it to NPU/TPU. Try out voice-to-voice mode, and be sure to enable Live Voice in settings."

jegly avatar Apr 25 '26 10:04 jegly

Yes I'm running latest release. Npu option is available. But it is loading model with GPU. When I select npu, it gives tf_lite_aux not found error. Image

https://github.com/jegly/Box/releases/tag/custom-rom-support-v1.0.2

its now a dedicated branch for Third party OS versions.

jegly avatar Apr 26 '26 04:04 jegly

The Nano models are not supported at all in grapheneOS?

KintsugiUwU avatar Nov 30 '26 08:11 KintsugiUwU