diff --git a/apps/android_rpc/app/src/main/AndroidManifest.xml b/apps/android_rpc/app/src/main/AndroidManifest.xml index d6e1ef8e6..7ca3b8bae 100644 --- a/apps/android_rpc/app/src/main/AndroidManifest.xml +++ b/apps/android_rpc/app/src/main/AndroidManifest.xml @@ -29,6 +29,8 @@ under the License. android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" + android:hardwareAccelerated="false" + android:largeHeap="true" android:icon="@mipmap/ic_launcher" > -shared - -framework JavaVM + -framework JavaNativeFoundation -Wl,-exported_symbol,_Java_* -undefined dynamic_lookup -Wl,-x diff --git a/python/tvm/auto_scheduler/cost_model/xgb_model.py b/python/tvm/auto_scheduler/cost_model/xgb_model.py index 5b10054d4..ea307627a 100644 --- a/python/tvm/auto_scheduler/cost_model/xgb_model.py +++ b/python/tvm/auto_scheduler/cost_model/xgb_model.py @@ -513,7 +513,11 @@ def custom_callback( # pylint: disable=import-outside-toplevel from xgboost.core import EarlyStopException from xgboost.callback import _fmt_metric - from xgboost.training import aggcv + # from xgboost.training import aggcv + try: + from xgboost.training import aggcv + except ImportError: + from xgboost.callback import _aggcv as aggcv state = {} metric_shortname = metric.split("-")[1] diff --git a/python/tvm/autotvm/measure/local_executor.py b/python/tvm/autotvm/measure/local_executor.py index 5dd5cba2b..4ab62c545 100644 --- a/python/tvm/autotvm/measure/local_executor.py +++ b/python/tvm/autotvm/measure/local_executor.py @@ -137,7 +137,7 @@ class LocalExecutor(executor.Executor): before submitting jobs. """ - def __init__(self, timeout=None, do_fork=True): + def __init__(self, timeout=None, do_fork=False): self.timeout = timeout or executor.Executor.DEFAULT_TIMEOUT self.do_fork = do_fork @@ -149,6 +149,11 @@ class LocalExecutor(executor.Executor): def submit(self, func, *args, **kwargs): if not self.do_fork: + try: + res = func(*args, **kwargs) + except Exception as exc: + res = exc + return LocalFutureNoFork(res) return LocalFutureNoFork(func(*args, **kwargs)) queue = Queue(2) # Size of 2 to avoid a race condition with size 1. diff --git a/python/tvm/autotvm/measure/measure_methods.py b/python/tvm/autotvm/measure/measure_methods.py index 4d6c5daad..7e354c48c 100644 --- a/python/tvm/autotvm/measure/measure_methods.py +++ b/python/tvm/autotvm/measure/measure_methods.py @@ -493,9 +493,10 @@ class _WrappedBuildFunc: """ tic = time.time() try: - filename = os.path.join( - tmp_dir, "tmp_func_%0x.%s" % (getrandbits(64), self.build_func.output_format) - ) + #filename = os.path.join( + # tmp_dir, "tmp_func_%0x.%s" % (getrandbits(64), self.build_func.output_format) + #) + filename = os.path.join("tmp_func_%0x.%s" % (getrandbits(64), self.build_func.output_format)) # TODO(tvm-team) consider linline _build_func_common func, arg_info = _build_func_common(measure_input, **kwargs) func.export_library(filename, self.build_func) @@ -573,7 +574,7 @@ def run_through_rpc( program_fpga(remote, None) reconfig_runtime(remote) - remote.upload(build_result.filename) + # remote.upload(build_result.filename) func = remote.load_module(os.path.split(build_result.filename)[1]) ctx = remote.context(str(measure_input.target), 0) @@ -592,6 +593,7 @@ def run_through_rpc( f_preproc=f_prepare, ) + ref_input = [np.ones(x[0], dtype=x[1]) for x in build_result.arg_info] # set input if ref_input: args = [nd.array(x, ctx=ctx) for x in ref_input] diff --git a/python/tvm/autotvm/tuner/xgboost_cost_model.py b/python/tvm/autotvm/tuner/xgboost_cost_model.py index 287cbffe6..583262346 100644 --- a/python/tvm/autotvm/tuner/xgboost_cost_model.py +++ b/python/tvm/autotvm/tuner/xgboost_cost_model.py @@ -469,7 +469,10 @@ def custom_callback( # pylint: disable=import-outside-toplevel from xgboost.core import EarlyStopException from xgboost.callback import _fmt_metric - from xgboost.training import aggcv + try: + from xgboost.training import aggcv + except: + from xgboost.callback import _aggcv as aggcv state = {} metric_shortname = metric.split("-")[1]