masahi commented on pull request #9069:
URL: https://github.com/apache/tvm/pull/9069#issuecomment-924844986


   @comaniac I figured out why task weights are different between graph vs VM 
compiler. It turns out that the VM compiler never calls 
`auto_scheduler.relay_integration.te_compiler_update_weights` callback, because 
the code path below is only used by the graph compiler.
   
   
https://github.com/apache/tvm/blob/be37923eca43c5b55793a7162cc5da526ddc8bce/src/relay/backend/te_compiler.cc#L864-L866
   
   Thus, in the VM case, weight is updated only in this line, which doesn't 
take multiplicity into account. So in VM, all task weights are 1.
   
https://github.com/apache/tvm/blob/92903b45659f094df7d41055d3a8da300fe4ff89/python/tvm/auto_scheduler/relay_integration.py#L366
   
   The commit 
https://github.com/apache/tvm/pull/9069/commits/8c16d40b394f8a837c2b788be1cd821db7eb2fd7
 fixed this issue. Now, task weights are identical between graph and VM. 


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