zackcquic opened a new pull request #7952:
URL: https://github.com/apache/tvm/pull/7952
This commit provides utilities to instrument passes:
1. Add a new namespace tvm.instrument
2. Introduce PassInstrument and PassInstrumentor to PassContext
Example
---------
passes_mem = #... Impl of memory instrument
passes_time = tvm.instrument.PassesTimeInstrument()
with tvm.transform.PassContext(
pass_instrumentor=PassInstrumentor([passes_mem, passes_time])):
tvm.relay.build(mod, 'llvm')
passes_mem.rendor()
passes_time.rendor()
3. Integrate existing PassContext::Trace() and timing profile
Thanks for contributing to TVM! Please refer to guideline
https://tvm.apache.org/docs/contribute/ for useful information and tips. After
the pull request is submitted, please request code reviews from
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
by @ them in the pull request thread.
Hi @altanh @tqchen:
I tried to integrate current passes profile mechanisms and make it more
extendable, usage is as the commit's code example. Many parts are inspired by
LLVM and MLIR.
How do you think?
This is my first attempt to TVM :), I have read through the guideline,
but it there are stilling something wrong, please let me know.
Regards,
Zack
--
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]