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

请问支持transformer模型吗?我尝试着使用vx-delegate 来推理whisper的tflite模型,但是总是报错 #199

Open
jayyang-zigbang opened this issue Aug 15, 2023 · 13 comments

Comments

@jayyang-zigbang
Copy link

Screenshot 2023-08-15 at 6 05 54 PM 我使用了多个whisper的tflite模型, 在cpu模式下都能正常推理,但是换成 vx delegate就会报错
@jayyang-zigbang
Copy link
Author

https://colab.research.google.com/drive/1CElRlLNbe9dRYpmu58jkbtu5lUKhMPRS?usp=sharing#scrollTo=dLkMa_36PgW-
我是用上面的代码转换得到的whisper tflite模型

@sunshinemyson
Copy link
Contributor

@jayyang-zigbang ,

Sorry for late reply.

We are able to support transformer model. According to your log, you failed in the low-level driver, could you share which OpenVX Driver in your test? and please share log with "export VSI_NN_LOG_LEVEL=5" and " export VIV_VX_DEBUG_LEVEL=1 "

Thanks

@jayyang-zigbang
Copy link
Author

@sunshinemyson
hi, firstly so thank you for your reply.
I was on the verge of giving up on the project,😭 but your reply has kindled a glimmer of hope within me. 😄

As you requested, I have exported some low-level logs. Please help me review them.
i.mx8plus_testwhisper_usingTflite-vx-delegate_error_log.txt

Regarding your inquiry about the OpenVX Driver, were you referring to the version of the OpenVX Driver used in my test? Unfortunately, I'm not sure how to check the version of the OpenVX Driver.

By the way, I conducted tests on i.MX 8M Plus EVK using TFLite models. Is there anything specific you'd like me to do or any questions you have about these tests?

thank you again.

@jayyang-zigbang
Copy link
Author

I wondered if there was something wrong with the tflite-vx-delegate. I also tried to rebulid tflite-vx-delegate from source. But i got fail.
image

@sunshinemyson
Copy link
Contributor

I wondered if there was something wrong with the tflite-vx-delegate. I also tried to rebulid tflite-vx-delegate from source. But i got fail. image

I can not figure out the issue from this snapshot. Maybe you can check with newer gcc version.

I review the log, i need to forward this to internal debug. Will post latest status here.

@sunshinemyson
Copy link
Contributor

@jayyang-zigbang jay,

We tried model by ourself, the model cannot run with tflite CPU reference implementation. Did you tried with CPU?

Thanks

@jayyang-zigbang
Copy link
Author

jayyang-zigbang commented Sep 8, 2023

hi @sunshinemyson , i am not sure which tflite file you tried. i will upload my tflite file. its works well on i.MX 8M Plus EVK cpu mode.
https://drive.google.com/drive/folders/17f-FZ1rdh1x9Bh8rm2tL6E9v4BvBdfpC?usp=sharing
if you have question just let me know it. thank you again.

@sunshinemyson
Copy link
Contributor

@jayyang-zigbang ,

Thanks, We will try it again with your model.

Thanks

@robert-kalmar
Copy link
Contributor

Hi @jayyang-zigbang, what version of BSP you are using? I suppose you use the Yocto Linux from NXP.

@jayyang-zigbang
Copy link
Author

jayyang-zigbang commented Sep 12, 2023

Hi @robert-kalmar, I only ran these tflite models on the original i.MX 8M Plus EVK linux. I didn't try to install any other linux os(BSP) on the i.MX 8M Plus EVK board.

@robert-kalmar
Copy link
Contributor

@jayyang-zigbang , copy me please the output of uname -a. Based on this I can identify the BSP version.

@jayyang-zigbang
Copy link
Author

@jayyang-zigbang , copy me please the output of uname -a. Based on this I can identify the BSP version.

Thank you for your prompt response. I'll check the BSP version tomorrow as I didn't bring the development board home with me. While we're on the topic, have you had a chance to test my Whisper TFLite models on the NPU? How do they perform on the NXP NPU? Or did you any experience for running transformer architecture on nxp npu?

@jayyang-zigbang
Copy link
Author

@robert-kalmar hi this is the output of uname -a ==> Linux imx8mp-alpha 5.15.71+g15429ab64ee9 #1 SMP PREEMPT Wed Apr 12 06:36:33 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

@jayyang-zigbang , copy me please the output of uname -a. Based on this I can identify the BSP version.

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

3 participants