An new exception is raised in a except block. However, this will lead to searching for an exception handler in the outer scope (beyond the entire try-except here). So the exception raised here will not be caught.
@merrymercy Could you check this?
An new exception is raised in a except block. However, this will lead to searching for an exception handler in the outer scope (beyond the entire try-except here). So the exception raised here will not be caught.
@merrymercy Could you check this?
Good catch. I fixed it in https://github.com/dmlc/tvm/pull/1566.
But it is not a fatal bug since current tuning scripts still work.
@merrymercy thanks, however I encountered another problem that exceptions are not caught, which made subprocesses not responding.
Traceback attached for your information.
Traceback (most recent call last):
File “at.py”, line 139, in
tuner.tune(n_trial=200, measure_option=measure_option, callbacks=[autotvm.callback.log_to_file(log_name)])
File “tvm/python/tvm/autotvm/tuner/tuner.py”, line 125, in tune
self.update(inputs, results)
File “tvm/python/tvm/autotvm/tuner/model_based_tuner.py”, line 250, in update
self.cost_model.fit(self.xs, self.ys, self.plan_size)
File “tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py”, line 142, in fit
x_train = self._get_feature(xs)
File “tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py”, line 255, in _get_feature
feas = pool.map(self.feature_extract_func, need_extract)
File “/usr/lib/python2.7/multiprocessing/pool.py”, line 251, in map
return self.map_async(func, iterable, chunksize).get()
File “/usr/lib/python2.7/multiprocessing/pool.py”, line 567, in get
raise self._value
tvm._ffi.base.TVMError: [15:22:26] tvm/src/op/tensorize.cc:127: Tensorize failed, split condition likely((((k.inner.inner + (k.inner.outer4)) + (k.outer1)) < 2048)) relies on var defined inside tensorize scope
This happened when some auto-tuned tile size did not meet constraints but I didn’t detect it and explicitly call raise_error
. Expected behavior is that AutoTVM catches this exception and continues iterations.
Can you try other tuners that needn’t feature extraction for now ? For example, GATuner(pop_size=100), XGBTuner(feature_type=‘knob’).
There are some constraints on the feature extraction of XGBTuner. I can fix it later.