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

[cirlce-interpreter] Run luci-interpreter in python directly #14352

Open
mhs4670go opened this issue Nov 22, 2024 · 0 comments
Open

[cirlce-interpreter] Run luci-interpreter in python directly #14352

mhs4670go opened this issue Nov 22, 2024 · 0 comments

Comments

@mhs4670go
Copy link
Contributor

What

Let's introduce a library to run circle-interpreter in python directly.

Why

As part of the work to make our ONE tools python friendly, running circle-interpreter in python directly is a good first step.

If a circle binary is being in the memory, it should be exported first to .circle file to run circle-interpreter because circle-interpreter only receive a circle file path.

This flow has a few problems. First, even though users just want to run circle model with numpy arrays in python interpreter, the flow forces users to dump circle file. Second, then, circle-interpreter re-loads the circle file for the inference, which causes to take double memory: the circle binary in python interpreter and the one in circle-interperter.

There is ctypes python library that allows calling c or c++ functions in DLLs or shared libraries directly. I'm going to introduce a library in circle-interpreter that can be used in python interpreter with ctypes library.

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

1 participant