tqchen commented on a change in pull request #5484:
URL: https://github.com/apache/incubator-tvm/pull/5484#discussion_r419626178
##########
File path: python/tvm/contrib/cc.py
##########
@@ -90,7 +90,8 @@ def get_target_triple():
def cross_compiler(compile_func,
options=None,
output_format=None,
- get_target_triple=None):
+ get_target_triple=None,
+ add_files=None):
Review comment:
Indeed it is an API tradeoff. The main advantage of functor decorator
style is that it is composable.
For example, we could pass use the following to attach minserver to the ndk
compiler.
```c++
mod.export_library("xyz", tvm.rpc.with_minrpc(cc.ndk))
```
Another reason is that in the case of minrpc, we need to attach a special
property(need_system_lib) to tell the export_library to check for the
`--system-lib` option.
We might need a bit more thoughts to make the alternative API(as follows)
work.
```c++
mod.export_library("xyz", cc.ndk, libs=[tvm.rpc.minrpc()])
```
Finally, such functor decorator is easier to work with in the AutoTVM(we
just have to pass the decorated version as build_func, instead of passing an
additional argument)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]