DKXXXL edited a comment on issue #4468: [RFC] Data-flow Analysis Functionality on TVM IR URL: https://github.com/apache/incubator-tvm/issues/4468#issuecomment-570014781 Hi @MarisaKirisame , I have several questions during the learning of AAM, about the advantage of implementing AAM over using the normal Dataflow Analysis framework (like the proposed one above) in the context of Relay. Because I have no experience in Relay at all, I would appreciate it if you can resolve these questions: 1. I was thinking about AAM has the power to unify CFA with a wide range of DFA. It is very tempting but considering the current application area of Relay. I am considering Relay more like a "glue" language that able to perform graph level optimization; which means there won't be any "computationally intensive" piece of code written in Relay. That brings me the question -- what is the benefit of designing a general analysis infrastructure if it won't affect the performance (since the computational heavy part is not written in Relay)? You already have several analyses scattered around. Other than refactoring and giving a better, clean and maintainable developing environment, is there an urgent or short-term benefit to do that? 2. Is there a benefit of adapting CFA in the context of Relay? In this post(#3895) I see you considering an example trying to combine pointer analysis with CFA, is that just for demonstration or that is a real requirement that can help the performance of Relay? I was thinking CFA will be very helpful in the context of Scheme because each function is very small, and CFA can hugely increase the precision of the Dataflow Analysis. However, in the official tutorial, the function in Relay [seems really big](https://docs.tvm.ai/tutorials/relay_quick_start.html#sphx-glr-tutorials-relay-quick-start-py). In that context, CFA doesn't seem to help the precision of DFA a lot; while my limited Functional Programming experience cannot come up with an example that CFA itself can help (something like devirtualization in C++ or inlining the callee). Could you give an example where CFA can help Relay code? 3. I am currently still learning AAM. If I understand correctly, even using AAM requires the definition of the abstract domain and the definition of abstract transfer function separately for different analyses. What's more, I currently have doubts about expressing backward analysis and live variable analysis using AAM. I can only find the related post [(mentioned at the very end)](http://pages.cs.wisc.edu/~horwitz/CS704-NOTES/10.ABSTRACT-INTERPRETATION.html) using abstract interpretation to define live variable analysis. This makes me wonder if AAM can subsume the general dataflow monotone framework. Could you give some references for using AAM to implement all kinds of analysis? Great Thanks, and Happy New Year! :)
---------------------------------------------------------------- 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] With regards, Apache Git Services
