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

Kernel Died when loading Custom model using pynq-dpu #110

Open
prawin-kumar opened this issue Nov 29, 2023 · 3 comments
Open

Kernel Died when loading Custom model using pynq-dpu #110

prawin-kumar opened this issue Nov 29, 2023 · 3 comments

Comments

@prawin-kumar
Copy link

Kernel Died
Setup:
Using Vitis AI 2.5 docker image
Pynq-DPU v2.5
Compiled a custom CNN model and quantized to create the xmodel file.
Trying to upload the xmodel on the Kria KV 260 SOM via the pynq-dpu overlay. However, directly loading the model via Overlay causes the python kernel to crash. So I used the xir and vart methods directly. But when using the create_runner() with the obtained subgraph the kernel crashes.

@skalade
Copy link
Collaborator

skalade commented Nov 29, 2023

Hi @prawin-kumar,

There could be a number of things that can cause the kernel to crash. Do the example models run OK for you, e.g. mnist, resnet50?

For debug I find it useful to convert the notebook into a script and run it in your jupyter terminal. When scripts fail can get more verbose outputs of the errors causing it than in jupyter.

Additionally you can try checking the jupyter log in /var/log/jupyter.log if there's anything useful there.

@prawin-kumar
Copy link
Author

Hey @skalade ,
The example models run perfectly fine on the board(Tested the resnet50,yolov3 and inceptionv1).
Tried to run the notebook as a script and found this:
Kernel crash
Kernel is stuck for quite sometime and automatically restarts and attached a relevant section of the log file:
Log snap

@skalade
Copy link
Collaborator

skalade commented Dec 4, 2023

If I were you, as a sanity test, I would try compiling something simple, like the mnist model https://github.com/Xilinx/DPU-PYNQ/blob/master/host/train_mnist_model.ipynb and creating a runner with that.

Given that that works then you know that your host->target flow is OK. This would only leave the model architecture as a culprit (you've ruled out runtime because the shipped models work, and you've ruled out compiler because re-compiled mnist works). Perhaps you're using an exotic layer that's not supported by the compiler? See if there's anything funny with your compilation output.

Nothing out of the ordinary in your jupyter log, that's quite common, I'd be looking for vart error messages or something like that.

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

2 participants