@weberlo What is the recommended way to create build function for ARMv7 devices now?
before PR-3227 I just did
build_func = cc.cross_compiler(cc="arm-linux-gnueabihf-g++")
But cc.cross_compiler
API was changed - string cc
was replaced with function compile_func
I ended up with the following code where I create my own function arm_gnueabihf_create_shared
just to override default compile_cmd
from g++ to arm-linux-gnueabihf-g++
It works but it is not that simple. Do you have better way to get build_func
which uses arm-linux-gnueabihf-g++
internally?
from tvm.contrib import cc
def arm_gnueabihf_create_shared(output,
objects,
options=None,
compile_cmd="arm-linux-gnueabihf-g++"):
cc.create_shared(output, objects, options, compile_cmd)
arm_gnueabihf_create_shared.output_format = "so"
tuning_option = {
'tuner': 'xgb',
'n_trial': 1500,
'early_stopping': 800,
'measure_option': autotvm.measure_option(
builder=autotvm.LocalBuilder(
build_func=arm_gnueabihf_create_shared
),
runner=autotvm.RPCRunner(
device_key, host=tr_addr, port=tr_port,
number=5,
timeout=10,
),
),
}