-
Notifications
You must be signed in to change notification settings - Fork 159
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
[onert/python] Separate prepare from session constructor #14525
[onert/python] Separate prepare from session constructor #14525
Conversation
Isn't it better to introduce new python API for |
I also think it's better, but it makes the python API changes for inference. Is it OK? # Create session and load nnpackage
# The default value of backends is "cpu".
session = infer.session(nnpackage_path, backends)
...
outputs = session.inference() To: # Create session and load nnpackage
# The default value of backends is "cpu".
session = infer.session(nnpackage_path, backends)
session = infer.prepare()
...
outputs = session.inference() |
Considering easy usage, we can remain current API - prepare at once if session is created with file path, and support new feature to create session only when file path is not passed and support load API and prepare API separately. |
@ragmani Please resolve conflict |
I added the code to allow the use of Prepare in the draft 8ef5277. If you feel it's acceptable, I will apply it to the next PR. |
34e5d68
to
fa432a6
Compare
This commit separates prepare function from initializing session instance. ONE-DCO-1.0-Signed-off-by: ragmani <[email protected]>
fa432a6
to
128961c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit separates prepare function from initializing session instance.
ONE-DCO-1.0-Signed-off-by: ragmani [email protected]