[COLLAGE] Add more customization to support more targets#13450
[COLLAGE] Add more customization to support more targets#13450masahi merged 38 commits intoapache:mainfrom
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
|
@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.
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 |
krishnaraj36
left a comment
There was a problem hiding this comment.
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)