mbaret commented on PR #12550:
URL: https://github.com/apache/tvm/pull/12550#issuecomment-1231399990

   > Regarding to testing the `ExprAllocator`, what's the problem with testing 
it? Would it be very difficult to do? It has quite a bit of logic in it (and at 
least to me, everything that has visitors becomes somewhat unpredictable and 
hard to reason about), so my instincts align here with @Mousius. But if the 
gains from testing it are marginal compared to the effort, I'd rather not stop 
that PR going ahead because of this.
   
   The functional logic of `ExprAllocator` is tested because it's part of the 
implementation of `AOTLowerMain` (specifically it's working out what Allocates 
are needed). I've chosen not to test it as a standalone component here for the 
same reason I haven't tested things like `CreateMainFunc` - all the behaviours 
of interest can be tested through the interface of `AOTLowerMain`.
   
   @Mousius raised the point that `ExprAllocator` has some logic that can't be 
easily tested through that interface, namely an optimization to avoid creating 
`StorageInfo` for functions `AOTLowerMain` doesn't care about. The current 
testing would allow this to regress with the consequence being a marginal 
(probably microsecond) performance regression.
   
   


-- 
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