Thank you for your reply.
I remove the ```cfg```, and I get the following error.
```
Traceback (most recent call last):
File "tune_conv2d_cuda_builtin_tmp_2.py", line 23, in <module>
target='cuda')
File "/usr/tvm/python/tvm/autotvm/task/task.py", line 418, in create
sch, _ = ret.func(*args)
File "/usr/tvm/python/tvm/autotvm/task/task.py", line 209, in __call__
return self._default_func(*args, **kwargs)
File "/usr/tvm/python/tvm/autotvm/task/task.py", line 215, in _default_func
out = self.fcompute(*args, **kwargs)
File "/usr/tvm/python/tvm/autotvm/task/topi_integration.py", line 155, in
wrapper
node = topi_compute(cfg, *args)
TypeError: conv2d_nchw() missing 4 required positional arguments: 'kernel',
'strides', 'padding', and 'dilation'
```
The code now is:
```
import logging
import sys
import numpy as np
import tvm
from tvm import te
import topi
from topi.testing import conv2d_nchw_python
from tvm import autotvm
logging.getLogger('autotvm').setLevel(logging.DEBUG)
logging.getLogger('autotvm').addHandler(logging.StreamHandler(sys.stdout))
# the last layer in resnet
N, H, W, CO, CI, KH, KW, strides, padding = 1, 7, 7, 512, 512, 3, 3, (1, 1),
(1, 1)
data = te.placeholder((N, CI, H, W), name='data')
kernel = te.placeholder((CO, CI, KH, KW), name='kernel')
conv = topi.nn.conv2d_nchw(data, kernel, strides, padding, dilation=1,
out_dtype='float32')
#cfg = autotvm.get_config()
task = autotvm.task.create("conv2d_nchw.cuda",
args=([conv],),
target='cuda')
print(task.config_space)
```
---
[Visit
Topic](https://discuss.tvm.ai/t/how-to-use-autotvm-with-manually-created-topi-computations/4895/6)
to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.tvm.ai/email/unsubscribe/8716537dc60e70b82a556f743621cc0ce87a4c0261d301b3b93cc31e540396e8).