tqchen opened a new issue #5741:
URL: https://github.com/apache/incubator-tvm/issues/5741


   AutoTensorCore is a pattern detection util that detects the matrix 
multiplication pattern, and rewrites the compute to make use of the tensorcore 
intrinsics. https://github.com/apache/incubator-tvm/pull/4234
   
   However, because part of the pattern analysis depends on the tensor 
expression information and couples with the analysis, it does not qualify as a 
pass.
   
   Under the unified IR, all transformation passes need to take in information 
from a PrimFunc, and output another information as a PrimFunc.  A pass should 
not take additional information from the high level stage. This being said, we 
could apply transformations in the high level to add decorations(e.g. pragma) 
to a loop to achieve the same goal.
   
   Due to the current restriction, the AutoTensorCore rewrite has been 
temporarily moved as a special post processor to 
   
https://github.com/apache/incubator-tvm/blob/master/src/te/schedule/schedule_postproc_rewrite_for_tensor_core.cc
   
   However, the nature of this rewriting really qualifies as a pass, since we 
want to reduce "non-pass"  transformations to a minimum set(only lowering from 
te to TIR).
   
   This is an issue to track the issue and discuss potential solutions. There 
are two potential ways to migrate the pass.
   
   - E0: Directly migrate the matmul pattern detector to search over the loop 
nest, instead of the te stage.
   - E1: If analysis on the te stage is necessary, run a light weight 
transformation on te to tag the tensor core related information.
   
   Ideally E0 is preferred. Notably, @Hzfengsy is also working on related 
changes to TIR to make direct pattern detection in the TIR easier.  
   
   
   
   
   
   


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


Reply via email to