-
Notifications
You must be signed in to change notification settings - Fork 141
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] Introduce CodegenManager class #12553
[onert] Introduce CodegenManager class #12553
Conversation
This commit introduces CodegenManager class. This class runs codegen() function to load target backend library and call the codegen function. ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com> Co-authored-by: Sanggyu Lee <sg5.lee@samsung.com>
namespace odc | ||
{ | ||
|
||
bool CodegenManager::codegen(const char *target, CodegenPreference pref) |
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.
I'm not sure what target
is but code that is checking the target
is necessary, 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.
target
is the term in compiler. source
and target
. You may think it as the binary of codegen. I agree to add check.
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.
You can find the detail explanation of target
string in header file.
* @param target Target backend name
* This target string will be used to find a backend library.
* The name of target backend library should follow the following rules:
* 'lib' + {backend extension} + '-gen' + {lib extension}
* And the target string should be a name except 'lib' and {lib extension}.
* For example, if the backend extension is 'aaa', the backend library name
* should be 'libaaa-gen.so', and the target string should be 'aaa-gen'.
This Codegen manager dynamically loads the target library. To find a shared library, a search policy must be defined. In this case, the library is searched for using this target string.
ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
PTAL all :) |
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 introduces CodegenManager class.
This class runs codegen() function to load target backend library and call the codegen function.
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