Hello!
When compiling simple code as below, an error occurs.
import numpy as np
from tvm import relay
from tvm.relay import testing
import tvm
from tvm import te
from tvm.contrib import graph_runtime
import topi
dtype="float32"
batch_size = 1
num_class = 1000
image_shape = (3, 224, 224)
data_shape = (batch_size,) + image_shape
out_shape = (batch_size, num_class)
mod, params = relay.testing.vgg.get_workload(
num_layers=16, batch_size=batch_size, image_shape=image_shape)
tvm_ph=[]
def LoadingParams(params):
for key in params:
if "bias" in key:
shape = (1, params[key].shape[0], 1, 1)
else:
shape = params[key].shape
tvm_ph.append( tvm.te.placeholder( shape, dtype=dtype, name=key))
LoadingParams(params)
input_ph = topi.te.placeholder( data_shape, dtype, name="input")
with tvm.target.cuda():
out = topi.nn.conv2d_nchw(Input=input_ph, Filter=tvm_ph[0], stride=[1,1]
, padding=[1,1,1,1], dilation=[1,1], out_dtype="float32")
sch = topi.generic.schedule_conv2d_nchw( out )
## RuntimeError: schedule not registered for 'cuda -model=unknown'
A runtime error occurs when a convolution using a simple cuda is not registered with the scheduler. Is the issue internal? Or am I using it wrong?
Thanks