Skip to content
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

kpu_run_kmodel: Result of model too large? #133

Open
Myphos opened this issue Oct 27, 2021 · 3 comments
Open

kpu_run_kmodel: Result of model too large? #133

Myphos opened this issue Oct 27, 2021 · 3 comments

Comments

@Myphos
Copy link

Myphos commented Oct 27, 2021

Expected behavior

I compiled a .tflite model with ncc 1.0.0-fec915fb and try to run it on K210.
Unfortunately the model isn't running because the code fails with the following error message:

[..m/runtime_module.cpp:65 (shape_reg)] id < shape_regs_.size() = false (bool)
error: Result too large

The summary of the compiled model is

SUMMARY
INPUTS
0	new_input	u8[1,3,240,320]
OUTPUTS
0	Identity	f32[1,6300,6]

MEMORY USAGES
.input	 225.00 KB	(230400 B)
.output	 147.66 KB	(151200 B)
.data	   2.93 MB	(3072000 B)
MODEL	 402.77 KB	(412440 B)
TOTAL	   3.69 MB	(3866040 B)

The model is fitting in the SRAM and I can initialize it with kpu_load_kmodel(&task, model_data_align) without error.
After that I try to run it with kpu_run_kmodel(&task, g_ai_buf, DMAC_CHANNEL5, ai_done, NULL) but this functions results in the error message.

Test code

I attached the model (yolo.zip). I simply replaced the kmodel file in the 'kpu' example of kendryte-standalone-demo with my model.

At least the kpu_run_kmodel function should run without any errors, right? Or am I missing some limitation that I oversaw?

Git Versions

kendryte-standalone-sdk: 02576ba
kendryte-standalone-demo: e89c354

Hardware

I'm using a Maixduino with OV2640 camera and the default display.

@txx-899
Copy link

txx-899 commented Apr 23, 2022

Have you solved it? I have the same problem

@junze6
Copy link

junze6 commented May 16, 2022

Have you solved it? I have the same problem

@zhen8838
Copy link
Member

@junze6 更新sdk的runtime了吗,要把你现在用的nncase版本对应的runtime copy到sdk中, 参考这里.

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

No branches or pull requests

4 participants