-
Notifications
You must be signed in to change notification settings - Fork 145
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/api] Introduce nnfw_compile and nnfw_set_compiled_model_path APIs #12583
[onert/api] Introduce nnfw_compile and nnfw_set_compiled_model_path APIs #12583
Conversation
This commit introduces nnfw_compile and nnfw_set_compiled_model_path. It contains a detailed description of these APIs in the header file. ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com> Co-authored-by: Sanggyu Lee <sg5.lee@samsung.com>
@jyoungyun I am not sure Internally when @chunseoklee / @hseok-oh and I wrote That is, in my mind,
Thus, I would like to use I would like to hear other's opinion. Also, after we used |
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 but code about codegen can be revised soon(or in the future).
- I discussed it with @jyoungyun and heard that almost code has been written before.
- That's why LGTM with some comment.
} | ||
|
||
assert(_codegen_manager != nullptr); | ||
_codegen_manager->exportModelPath(std::string(path)); |
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.
This is just setter for _export_model_path
, right? This is really confusing... In the future, this should be fixed, I think.
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.
@YongseopKim Thank you for your comment. :) Can I ask what you want to fix?
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.
(Above all, I don't say that this should be done right now. This is one of points to revise in the future.)
I talked to the name exportModelPath()
.
_codegen_manager->exportModelPath(std::string(path));
export is a verb word so the method can be translated to 'the manager exports with the model path and returns a something to be export'.
That's why I'm saying to fix it. 😄
} | ||
|
||
assert(_codegen_manager != nullptr); | ||
auto export_model_path = _codegen_manager->exportModelPath(); |
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.
This is just getter for _export_model_path
.
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.
This is not calculating(manipulating) path for model.
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.
Let's revise this for sure in the future!
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.
This is not calculating(manipulating) path for model.
I'm sorry but I couldn't catch your intention. Could you explain that in some detail?
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.
Ditto
auto export_model_path = _codegen_manager->exportModelPath(); | ||
// If the export_model_path is not set, it generates a compiled model path | ||
// automatically. | ||
if (export_model_path.empty()) |
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.
These code(Set the proper model path with some vars) can be in CodegenManger.
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.
@YongseopKim I agree to implement this function in CodegenManager. I will update it in another PR. :)
I have similar opinion with @glistening. Additionally, |
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. Let's revise later. The APIs are in nnfw_experimental.h
. We may change it.
I agreed with your opinion. I also thought this api name is not suitable for Codegen feature. If everyone agrees to modify this function to use |
Agree |
Agree |
Agree. |
ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
830fb35
If you want to update this PR's title, please let me know. Currently, I just added a new commit for this change. |
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 👍
@glistening PTAL |
@glistening PTAL, again. |
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
@jyoungyun Could you update (or May I edit) the commit title as the function names are changed? It may be better to update by myself, since it already has 2 approvals. |
I've updated title and commit. |
This commit implements codegen function in onert_run. As discussed below, the `compile` string of functions and variables has been changed to `codegen`. Samsung#12583 (comment) ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
This commit implements codegen function in onert_run. As discussed below, the `compile` string of functions and variables has been changed to `codegen`. #12583 (comment) ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
This commit introduces nnfw_compile and nnfw_set_compiled_model_path.
It contains a detailed description of these APIs in the header file.
ONE-DCO-1.0-Signed-off-by: Jiyoung Yun jy910.yun@samsung.com
Co-authored-by: Sanggyu Lee sg5.lee@samsung.com
Related issue : #12505
Draft PR: #12504