To create a task using relay.nn.conv2d for CPU (x86) you can do:
func_create = 'topi_x86_conv2d_NCHWc'
args= (('TENSOR', data_shape, 'float32'), ('TENSOR', kernel_shape, 'float32'), strides, padding,dilation, 'NCHW', 'float32')
workload = ('conv2d', data_shape_type, kernel_shape_type, strides, padding, dilation, 'NCHW', 'float32') # Workload for the task
task = autotvm.task.create(func_create, args=args,target=target, template_key='direct')
This workflow was followed in the previous version of the x86 auto-tuning tutorial for CNN.
However, for my application, I would like to create a âtopi_nn_conv2dâ task instead (as the ones in the tutorial:
Something of the form
[Task(func_name=topi_nn_conv2d, args=(('TENSOR', (1, 3, 227, 227), 'float32'), ('TENSOR', (96, 3, 11, 11), 'float32'), (4, 4), (0, 0, 0, 0), (1, 1), 'NCHW', 'float32'), kwargs={}, workload=('conv2d', (1, 3, 227, 227, 'float32'), (96, 3, 11, 11, 'float32'), (4, 4), (0, 0, 0, 0), (1, 1), 'NCHW', 'float32'))]
If I use âfunc_create = topi_nn_conv2dâ in the code above, it throws an error (likely because âtopi_nn_conv2dâ has not been defined as a task, such as âtopi_x86_conv2d_NCHWcâ).
I was wondering if somebody knows of a simple way to create a task of type âtopi_nn_conv2dâ to do auto-tuning in the GPU