`RelayExprNode` represents the `ObjectPtr` in the AST. The same node might need 
to be referenced at different places across code base, and so the `RelayExpr` 
is a reference counted object that points to the `RelayExprNode`. You can think 
of `RelayExpr` as a type of shared_ptr to the underlying node. This allows us 
to pass and copy the reference as needed, without worrying about memory 
management.

The best place I found to understand TVM's Object system in depth was first at 
the [docs 
here](https://tvm.apache.org/docs/arch/runtime.html#tvm-object-and-compiler-stack)
 and then the comments at the [`Object.h` file 
here](https://github.com/apache/tvm/blob/9324a7c3ef17e70234f7fcd75a291e67bade037c/include/tvm/runtime/object.h#L84-L166)





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/questions-about-ir-expressions-relayexpr-relayexprnode/15416/3)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/9edef6f6a571d0658a1b6e2afdc1006d712f9b9c34fbd5358b93e0cfd8a7a9bd).

Reply via email to