manupa-arm commented on pull request #22:
URL: https://github.com/apache/tvm-rfcs/pull/22#issuecomment-928888645


   @areusch @junrushao1994 I have added a section to say how constants are 
added to the IRModule, now.
   
   Summary :
   
   The storage of constants in the IRModule, will be in "Constants" attribute 
as Array\<NDArray>
   
   Basically, if the tir.allocate_const node is created first, then the 
PrimFunc and lastly if it gets added to the IRModule, IRModule::Add(...) will 
need to traverse the stmts and fetch the constants and store the ObjectRefs in 
the IRModule and cross-update the optional index in the allocate_const node.
   
   On the other hands, if the constants are already present in the IRModule, 
the tir.allocate_const could be created using the NDArray ObjectRef and the 
index of NDarray in the IRModule, directly.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to