I spent 5hr today add a new Node

Because I forgot to do TVM_REGISTER_NODE_TYPE(XXXNode) in .cc.

If you see TVMError: Check failed: it != type_key2index_.end(): Cannot find type XXX, that’s probably the reason.

8 Likes

Haha, thanks for sharing!

Could you please write a tutorial about how to add a node from relay to topi? thanks

This would be great if we can have a comprehensive tutorial :slight_smile:

1 Like

Sorry to hear that, we had comments in https://github.com/apache/incubator-tvm/blob/master/include/tvm/runtime/object.h#L129

We should add more comments to node.h

Yes! My recent PR took lots of time because it was not obvious that TVM_REGISTER_NODE_TYPE was needed.

2 Likes

@hcho3 can you take a stab to add the additional comment :)?

would it be helpful to remind about TVM_REGISTER_NODE_TYPE in the error message?

That is a great idea @yzhliu