chunit-quic commented on code in PR #13402:
URL: https://github.com/apache/tvm/pull/13402#discussion_r1040363248


##########
src/relay/ir/expr.cc:
##########
@@ -72,8 +72,8 @@ Constant::Constant(runtime::NDArray data, Span span) {
 
 TVM_REGISTER_NODE_TYPE(ConstantNode);
 
-TVM_REGISTER_GLOBAL("relay.ir.Constant").set_body_typed([](runtime::NDArray 
data) {
-  return Constant(data);
+TVM_REGISTER_GLOBAL("relay.ir.Constant").set_body_typed([](runtime::NDArray 
data, Span span) {

Review Comment:
   Hi areusch,
   
   Thanks for replying!
   About the question "Is the plan to invoke this via PackedFunc between each 
pass?". 
   
   No, this SpanFiller will not be triggered between each pass. Perhaps there 
are some misunderstandings. Please allow me to describe more. :D 
   
   This PR, and the SpanFiller is for "frontend conversion" specifically. Take 
the upcomming PR of TFLite span filling for example, the function "set_span()" 
is invoked after a [conversion of an operator 
only](https://github.com/chunit-quic/tvm/blob/cee1703b4be6ac0e1ed3fb7c493432c95e7a5231/python/tvm/relay/frontend/tflite.py#L282).
   
   About the [span filling mechanism for the 
passes](https://discuss.tvm.apache.org/t/pre-rfc-tvm-explorer-infrastructure/13457#pass-source-information-builder-6),
 we will use the SequentialSpan and source information builder to deal with. 
They are another set of classes and function to propagate span between passes 
specifically.
   
   If there is any confusing part please feel free to let me know, I will try 
to make it clear. :)
   Thank you!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to