-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(ml): ML on Rockchip NPUs #15241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Docker launch command: and it works (if you download model to cache ofc)
|
|
I've uploaded the facial recognition models as well as some new SigLIP2 models to HF. I can upload the rest after we confirm everything works as expected with these models. |
|
I was having issues with GH codespaces while trying to fix tests yesterday, can you take a look? 😞 |
Is it loading the model once per thread or something? |
|
so I'm running the build on my rk3588 library and I'm honestly sold for rknn > armnn:
Some more remarks:
Anyway -- this is great! |
|
I was thinking to change its data format before sending it to rknn to quiet the "the data format will be changed" warning |
Wonder if anyone knows if the conversion actually works as expected, besides the "seems to be reasonable" empirical observation. Like comparing outputs between onnix and rknn for the same inputs, or something similar. Exporter has an option for dynamic inputs, I guess exporting with that would silence the dynamic range part? Also, maybe exporter has option for changing format? |
|
I haven't compared the raw model outputs between ONNX and RKNN. There's a small inherent difference in fp16 vs fp32, but since the results look good and there's no quantization involved, I didn't probe deeper. Setting dynamic inputs wouldn't fix that warning because the warning isn't related to the batch dimension but the layout (NCHW vs NHWC). Sending NHWC inputs would be one way of getting rid of the warnings. It might be a bit more efficient than how that conversion is handled now, because it currently allocates new arrays to make the inputs contiguous, then the engine internally reorders those arrays. If you permute the arrays before making them contiguous, you'd be fusing those two operations together. |
|
So as it turns out, RKNN will permute the input array regardless, so if I permute it beforehand then it'll just mess it up by doing it a second time. Setting the log level to error does make those warning logs go away though. |
|
XLM-Roberta-Base-ViT-B-32__laion5b_s13b_b90k Custom OP Example By the way, should I open a new issue or we can just start from this thread? |
|
It'd be better to open a new issue. |
|
nice work, great thanks for your contribution. May I ask is there any doc about convert model to run on rockchip? |
|
https://github.com/immich-app/ml-models
糖橙结 ***@***.***> 於 2025年7月18日 週五 下午8:40 寫道:
… *ITCJ* left a comment (immich-app/immich#15241)
<#15241 (comment)>
nice work, great thanks for your contribution
—
Reply to this email directly, view it on GitHub
<#15241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASF5CKAH3DMJ3267GU5YPWT3JDTNBAVCNFSM6AAAAABU7QYIGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAOBZGM2TSNBYGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Goals: ML on Rockchip NPUs.
Testing on board: #13243 (reply in thread)
TODO:
immich-app/ViT-B-32__openai/textual/rk3566/model.rknn) .Nice to have:
#13243