RuntimeError: schedule_injective not registered for 'ccompiler '

i build tvm with macro : -DUSE_CODEGENC=ON and i want use codegen.cc to generate target code , here’s my python code:

import sys, os

import numpy as np

import torch

from tvm import relay

from tvm.relay import testing

import tvm

from tvm import te

from tvm.contrib import graph_executor

import tvm.testing

import torch.nn as nn

class VecAdd(nn.Module):

def __init__(self):

    super(VecAdd, self).__init__()

    return

def forward(self, x):
    x = x + 5
    return x

if name == ‘main’:

model = VecAdd()

model = model.eval()

input_shape = [1, 3, 224, 224]

input_data = torch.randn(input_shape)

scripted_model = torch.jit.trace(model, input_data).eval()

input_name = "input0"

shape_list = [(input_name, input_shape)]

mod, params = relay.frontend.from_pytorch(scripted_model, shape_list)

# set show_meta_data=True if you want to show meta data

print(mod.astext(show_meta_data=False))

# target = tvm.target.cuda()  # USE_CUDA=ON

target = tvm.target.Target("ccompiler")

lib = relay.build(mod, target, params=params)

from tvm.contrib import utils

temp = utils.tempdir()

path_lib = temp.relpath("deploy_lib.tar")

print("exporting lib to {}".format(path_lib))

lib.export_library(path_lib)

print(temp.listdir())

loaded_lib = tvm.runtime.load_module(path_lib)


print("END")

then error comes: RuntimeError: schedule_injective not registered for 'ccompiler ’

do any one has some idea ?

related to this discussion: Is there a end2end demo for bring your own codegen to tvm