Nanmur commented on issue #19965:
URL: https://github.com/apache/tvm/issues/19965#issuecomment-4910365658

   Thanks a lot for looking into this and for opening #19966 for the Squeeze 
axes-attribute case.
   
   For dynamic TopK, native symbolic k support would be ideal from a user 
perspective, especially for importing full detection post-processing graphs. 
That said, I do not want to insist that TVM must support dynamic k natively if 
this does not fit the intended Relax/ONNX frontend design.
   
   If the preferred direction is to require k to be resolved before import, 
that would also be acceptable, as long as the importer gives a clear diagnostic 
and ideally documents the recommended preprocessing path.
   
   I also wanted to ask about the general preprocessing direction. In testing, 
some ONNX models that could not be imported by TVM directly could be imported 
after equivalent graph rewrites, for example:
   
   - folding static Shape/Gather/Concat-style shape subgraphs into initializers;
   - fixing missing or empty Resize roi inputs;
   - rewriting static Split tensor inputs into Slice nodes when the split sizes 
are known;
   - removing or bypassing inference-time Dropout;
   - in some Paddle-style OCR graphs, considering rewrites around Unsqueeze -> 
Conv(1xK) -> Squeeze patterns.
   
   Are these kinds of graph-level preprocessing steps considered a 
reasonable/recommended way to prepare ONNX graphs for TVM import, provided that 
the rewritten graph is validated against ONNX Runtime and numerical outputs are 
checked?
   
   Or would the maintainers recommend a different approach, such as keeping the 
ONNX graph unchanged and improving the importer/op support case by case?
   
   In particular, I am concerned about whether such preprocessing could 
accidentally change model semantics, layout assumptions, or numerical behavior. 
Any guidance on which rewrites are safe, which ones should be avoided, and 
which ones should instead be fixed inside TVM would be very helpful.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to