junrushao1994 edited a comment on issue #7805: URL: https://github.com/apache/tvm/issues/7805#issuecomment-814577630
Yeah it looks like the params in the PrimFunc signature are not the variables used in the function body. ```python pf = lowered["main"] # `addr1` is the variable in the function signature addr1 = pf.params[0].handle # `addr2` is the variable contained in the corresponding buffer addr2 = pf.buffer_map[pf.params[0]].data.handle # `addr3` is the variable used in the function body addr3 = pf.body.body.value.a.buffer_var.handle # we can see addr2==addr3, but addr1 != addr2 print(addr1) print(addr2) print(addr3) ``` So the vars in the function signature are not the ones used in the function body, but it can be somehow retrieved from the buffer_map. Is this or a bug or intentional? like, to avoid cyclic dependency? @tqchen -- 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. For queries about this service, please contact Infrastructure at: [email protected]
