Samsung / ONE

On-device Neural Engine
Other
435 stars 157 forks source link

[onert] Introduce ONE Runtime Python binding #11368

Open KangInyeong opened 1 year ago

KangInyeong commented 1 year ago

What

Let's support NNFW Python API.

Why

Expected benefits

Tasks

Draft : #11541

jaemaning commented 1 year ago

We want to proceed with binding by targeting the runtime/onert/api/include/nnfw.h file.

I think it will be done by creating the above 3 files, but I wonder which working folder you think would be better to work in.

if there are better way to work, please suggest to me.

glistening commented 1 year ago

Welcome! I think new directory of runtime/onert/python/api would be introduced as working directory for python API binding.

@Samsung/one_onert, @hseok-oh, @chunseoklee Please give your opinion.

@KangInyeong, @jaemaning Please don't wait for our decision. You may work in any directory. The location will be reviewed when you push a draft PR. Relocating home for python binding would not require much time. :)

ragmani commented 1 year ago

I agree with @glistening. runtime/onert/python/api looks good.

I think we can consider the location of nnfw_api_pybind11_tutorial.py depending on what role it is. If you have a plan to implement nnfw_api_pybind11_tutorial.py with the bound python modules without installing the published python package, it would be a good choice to put the python file in runtime/onert/python/api as well. Or If you mean the tutorial will be implemented with the published python package, another location may be better.

Anyway, please don't wait for our discussion as @glistening said.

hseok-oh commented 1 year ago

IMO, it's enough to use runtime/onert/python without api directory because python will be used for API only under onert directory.

Additionally, we may need to rename runtime/onert/api to runtime/onert/capi.

glistening commented 1 year ago

When I suggest python/api, I was thinking of the following structures:

$ tree runtime/onert/python/
runtime/onert/python/
├── api
├── samples
└── tests

But I am okay for @hseok-oh's suggestion.

We may put

Later, move python to under api:

I like @hseok-oh's suggestion, which looks simpler.