An error when doing autotune tensorflow net uisng opencl on Intel integrated graphics


#1

The error shows:
op_name:% conv2d
debug: [test_on_x86.py]
[Task 1/48] Current/Best: 0.00/ 0.00 GFLOPS | Progress: (152/240) | 8.96 sWARNING:autotvm:Too many errors happen in the tuning. Now is in debug mode
DEBUG:autotvm:No: 153 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(ValueError(‘Direct host side access to device memory is detected in default_function. Did you forget to bind?’,),), error_no=2, all_cost=0.04875493049621582, timestamp=1569559728.411808) [(‘tile_ic’, [-1, 4]), (‘tile_oc’, [-1, 1]), (‘tile_ow’, [-1, 64]), (‘tile_oh’, 2)],direct,None,232
DEBUG:autotvm:No: 154 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(ValueError(‘Direct host side access to device memory is detected in default_function. Did you forget to bind?’,),), error_no=2, all_cost=0.02920222282409668, timestamp=1569559728.411942) [(‘tile_ic’, [-1, 16]), (‘tile_oc’, [-1, 1]), (‘tile_ow’, [-1, 4]), (‘tile_oh’, 1)],direct,None,34
DEBUG:autotvm:No: 155 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(ValueError(‘Direct host side access to device memory is detected in default_function. Did you forget to bind?’,),), error_no=2, all_cost=0.021858930587768555, timestamp=1569559728.4120166) [(‘tile_ic’, [-1, 1]), (‘tile_oc’, [-1, 1]), (‘tile_ow’, [-1, 8]), (‘tile_oh’, 2)],direct,None,170
DEBUG:autotvm:No: 156 GFLOPS: 0.00/0.00 result: MeasureResult(costs=(ValueError(‘Direct host side access to device memory is detected in default_function. Did you forget to bind?’,),), error_no=2, all_cost=0.03089284896850586, timestamp=1569559728.4223707) [(‘tile_ic’, [-1, 2]), (‘tile_oc’, [-1, 2]), (‘tile_ow’, [-1, 24]), (‘tile_oh’, 2)],direct,None,206
WARNING:autotvm:Too many errors happen in the tuning. Now is in debug mode

what caused this error?

Thanks a lot!


#2

The error message “Direct host side access to device memory is detected in default_function. Did you forget to bind?” shows when the thread binding is missing in the scheduling for OpenCL. I think @Laurawly may know more about this.


#3

thanks , I forgot to bind the op to related topi schedule

if op_name == ‘conv2d’:
func_create = ?
elif op_name == ‘depthwise_conv2d_nchw’:
func_create = ?

for intel integrated graphics autotune, it seems there is no @autotvm.task.register part for 'depthwise_conv2d_nch

tuning_option = {
‘log_filename’: log_file,
‘tuner’: ‘xgb’,
‘early_stopping’: None,

'measure_option': autotvm.measure_option(
    builder=autotvm.LocalBuilder(timeout=10),
    runner=autotvm.LocalRunner(
          'opencl', ???
          '0.0.0.0', 9190, ???
           number=10, repeat=1,timeout=4  min_repeat_ms=1000),
),

}
def tune_kernels(tasks,
measure_option,
tuner=‘xgb’,
early_stopping=None,
log_filename=‘tuning.log’,
use_transfer_learning=True,
try_winograd=True):
if try_winograd:
for i in range(len(tasks)):
try:
tsk = autotvm.task.create(tasks[i].name, tasks[i].args,
tasks[i].target, tasks[i].target_host, ‘winograd’)
input_channel = tsk.workload[1][1]
if input_channel >= 64:
tasks[i] = tsk
except Exception:
pass
…?