You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/02/05 01:14:55 UTC
[GitHub] [incubator-tvm] FrozenGene commented on issue #4749: [AutoTVM]
Support to pass additional compiler options
FrozenGene commented on issue #4749: [AutoTVM] Support to pass additional compiler options
URL: https://github.com/apache/incubator-tvm/pull/4749#issuecomment-582194982
> Try something along the following line:
>
> ```python
> from tvm.contrib import cc, ndk
>
> build_func = cc.cross_compiler(ndk.create_shared, options)
>
> tuning_option = {
> // ...
> 'measure_option': autotvm.measure_option(
> builder=autotvm.LocalBuilder(
> build_func=build_func if use_android else 'default', options=options),
> ...
> ),
> }
> ```
>
> Perhaps it is a good time to document these usecases of cross_compiler(e.g. get target triple from compile_func if it has the attr)
Yes. Your way is good and don't change anything. Do you mean this ?
```python
from tvm.contrib import cc, ndk
build_func = cc.cross_compiler(ndk.create_shared, options)
tuning_option = {
// ...
'measure_option': autotvm.measure_option(
builder=autotvm.LocalBuilder(
build_func=build_func if use_android else 'default'),
...
),
}
```
No options needed in the builder.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services