mbrookhart opened a new pull request #7429:
URL: https://github.com/apache/tvm/pull/7429


   We've been hitting a lot of issues in more complicated ONNX models where 
results of something like dynamic strided slice feed into an op like dynamic 
reshape, causing dynamic ranks to appear and crash the importer. To fix this, I 
decided it might be good to try to progagate constant information through the 
importer during import instead of trying to retroactively remove dynamic ops in 
a pass. To do that, I changed the freeze_params behavior of the importer to 
create constants before import, and made the importer fold constants through 
the importer as they are seen. Additionally, I edited the ops to only construct 
dynamic ops if the inputs are not constant.
   
   In sum, this ends up creating many fewer dynamic ops in the ONNX importer, 
and so we see many fewer dynamic rank issues when importing models.
   
   I've labeled this WIP for now, it depends on #7423 and I have a hack in 
place while waiting on that PR, but I'll like to get the full CI running and 
some eyes on it in the mean time.
   
   cc @masahi @jwfromm @electriclilies 
   
   


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