kendryte / nncase

Open deep learning compiler stack for Kendryte AI accelerators ✨
Apache License 2.0
746 stars 181 forks source link

Encounter bad_function_call during compiler.compile() with a customized transformer model #1154

Closed Ruofeng-Wang closed 7 months ago

Ruofeng-Wang commented 9 months ago

Describe the bug A clear and concise description of what the bug is. I am working on a transformer model in pytorch. After cleaning it up, I converted to onnx format and pass the onnx model to https://github.com/kendryte/nncase/blob/release/1.0/docs/USAGE_ZH.md#%E7%BC%96%E8%AF%91float32-onnx%E6%A8%A1%E5%9E%8B suggested as an onnx compile example.

To Reproduce Command line or scripts to reproduce the behavior: python k510_compile_script.py --target k510 --dump_dir temp --onnx model.onnx --kmodel transformer.kmodel

Expected behavior A clear and concise description of what you expected to happen.

Origin model and code If applicable, add orgin model and code to help explain your problem.

The k510_compile_script.py and model.onnx are all in this repo https://github.com/Ruofeng-Wang/diffusion_policy/tree/main

Environment (please complete the following information):

ubuntu20

Additional context IMG_9923

Add any other context about the problem here.

Ruofeng-Wang commented 9 months ago

original pytorch model: https://github.com/T-K-233/Diffusion-Benchmark/tree/main model.py