Hzfengsy opened a new pull request, #18511:
URL: https://github.com/apache/tvm/pull/18511

   Add a new DumpIR pass instrument that automatically dumps the IR module to 
files after each pass execution. This helps with debugging and understanding 
pass transformations.
   
   Features:
   - Dumps IR to numbered files (e.g., 000_PassName.py, 001_PassName.py)
   - Optional refresh parameter to clean dump directory before starting
   - Safe directory removal that only deletes if directory contains dump files
   - Graceful error handling if IR script generation fails
   
   Example usage:
       with tvm.transform.PassContext(instruments=[DumpIR(\"./dump\", 
refresh=True)]):
           lib = tvm.compile(module, target=\"llvm\")
   
   Also includes minor cleanup:
   - Rename RelayPassContextThreadLocalStore to PassContextThreadLocalStore
   - Remove unused includes in transform.cc and unroll_loop.cc
   - Add type hints to PrintAfterAll and PrintBeforeAll"


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