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

will support python interface? #344

Open
zjd1988 opened this issue Apr 6, 2022 · 11 comments
Open

will support python interface? #344

zjd1988 opened this issue Apr 6, 2022 · 11 comments

Comments

@zjd1988
Copy link

zjd1988 commented Apr 6, 2022

No description provided.

@sunshinemyson
Copy link
Contributor

Hi @zjd1988 ,

So far, no plan to support python. Could you share more background why you interested with python interface? I can promote your information to the team. Thanks

@zjd1988
Copy link
Author

zjd1988 commented Apr 6, 2022

hi @sunshinemyson, thanks for your reply.
I have a rv1109 borad, and converted onnx to rknn model by RK tools. In order to test the rknn model's accuracy with a test dataset , I use rk's x64 simulator to infer model, but it takes too long to infer a image.
I know RK use VeriSilicon‘s npu ip, So I am trying to convert rknn model to tim-vx model to simulate.
Currently,I can parse the rknn model with layer's detail info( weight, scale, zero point),
and next trying to use the tim-vx's python api( not supported yet) to construct model

@sunshinemyson
Copy link
Contributor

@zjd1988 ,

Sorry that RV1109 is not actively supported from our side, even if you can overcome the conversion issue, their driver stack is not verified with TIM-VX. I would like to recommend VIM3/VIM3L dev-kit to you, they are active and verified by us.

The vx-delegate is preferred for inference on board. Hope you can enjoy it. Thanks.

@zjd1988
Copy link
Author

zjd1988 commented May 8, 2022

@sunshinemyson I have implemented a simple python binding for timvx,verified with lenet example
https://github.com/zjd1988/TIM-VX-python/tree/main/src/pytim

@sunshinemyson
Copy link
Contributor

@zjd1988,

Great job, Thanks for sharing. Would you like merge it to tim-vx?

@zjd1988
Copy link
Author

zjd1988 commented May 9, 2022

@sunshinemyson I‘m not sure’whether the code quality is good enough to merge. You may check it out first.

@zjd1988
Copy link
Author

zjd1988 commented May 9, 2022

Hi @sunshinemyson, I have a simple question, weights tensor's data layout is NCHW or WHCN in lenet_asymu8_weights.h?

@zjd1988
Copy link
Author

zjd1988 commented May 10, 2022

Hi @sunshinemyson, Is it convenient to communication with wechat (xd-zjd)

@sunshinemyson
Copy link
Contributor

Hi @sunshinemyson, I have a simple question, weights tensor's data layout is NCHW or WHCN in lenet_asymu8_weights.h?

For convolution's kernel, data layout in memory is Oc,Ic,H,W, In VX, it descripted in shape as C_Array[W,H,Ic,Oc] - column major description.

@fengwang
Copy link

Hi @sunshinemyson, I have a simple question, weights tensor's data layout is NCHW or WHCN in lenet_asymu8_weights.h?

For convolution's kernel, data layout in memory is Oc,Ic,H,W, In VX, it descripted in shape as C_Array[W,H,Ic,Oc] - column major description.

@sunshinemyson Does it necessarily mean all the data layout description in tim-vx is column major? Or have you documented this somewhere I missed out?

@sunshinemyson
Copy link
Contributor

@fengwang ,

Sorry for late. https://github.com/VeriSilicon/TIM-VX/blob/main/docs/Programming_Guide.md#memory-layout
Here is the doc about memory layout.

@sunshinemyson sunshinemyson added this to the 23Q1_rel milestone Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants