-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[COLLAGE] Add more customization to support more targets #13450
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
da3efbf
to
2c2e9cc
Compare
@mbs-octoml can you take a look on this PR ? |
1. Added custom cost module to provide a provision to incorporate custom cost estimator python function instead using default cost function. eg: cost_estimator = CustomCostEstimator(py_fn_estimator="tvm.relay.collage.opencl_cost_estimator") mod = CollagePartition(config, cost_estimator=cost_estimator)(mod) 2. Added provision to select BYOC fusion style for all compiler target. eg : config = { "relay.collage.byoc_fusion_style": ["compiler.NoFusion", "compiler.TVMFusion"]} ctxt = tvm.transform.PassContext(config=config)
4ab2135
to
cd0e178
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.
@tqchen Do we have moderator for Collage ? |
@masahi any moderator for Collage ? |
Not sure and I'm not familiar with it either. But I can take care of this. |
|
@masahi |
@masahi |
|
||
logging.info(f"Invoking runner...") | ||
|
||
os.system(f"python3 {runner_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.
That doesn't answer my question. Why not, instead of runner_template
thing and invoke the string with os.system
, wrap the same functionality in a normal function and call it however time you want.
@masahi |
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 have added the modification to the code as per your suggestion.
Please review and let me know your feedback.
* [COLLAGE] Add more customization to support more targets 1. Added custom cost module to provide a provision to incorporate custom cost estimator python function instead using default cost function. eg: cost_estimator = CustomCostEstimator(py_fn_estimator="tvm.relay.collage.opencl_cost_estimator") mod = CollagePartition(config, cost_estimator=cost_estimator)(mod) 2. Added provision to select BYOC fusion style for all compiler target. eg : config = { "relay.collage.byoc_fusion_style": ["compiler.NoFusion", "compiler.TVMFusion"]} ctxt = tvm.transform.PassContext(config=config) * Fix the lint errors * Fix the lint error whitespace * Fix the lint error tabs * Fix the lint error tabs * Fix the lint error tabs * move the clml collage test case to test_clml * Fix lint error whitespace * Fix the import error * Fix the envirnoment var and import * Add comments * Add clml preprocess module in cost estimator * Fix whitespace lint error * Fix whitespace lint error * Fix whitespace lint error * Fix the comments and removed unwanted code * Fix whitespace error * Removed Todo comments * Removed TODO comments * Updated naming convension * Fix typo error * Fixe the typo error * Corrected typo error * Corrected typo error * Removed unused and fix typo error * Removed redundent code and optimize the code * Fix the lint error * Fix whitespace lint error * Removed Prints in file * Fix lint error * Fix lint error * Removed runner template in test script * Fix the lint error * Fix lint error * Fix lint error * Fix the lint error * Fix the lint error Co-authored-by: kvegiraj <kvegiraj@qti.qualcomm.com>
eg: cost_estimator = CustomCostEstimator(py_fn_estimator="tvm.relay.collage.opencl_cost_estimator")
mod = CollagePartition(config, cost_estimator=cost_estimator)(mod)
eg : config = { "relay.collage.byoc_fusion_style": ["compiler.NoFusion", "compiler.TVMFusion"]}
ctxt = tvm.transform.PassContext(config=config)