You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/03/19 07:08:46 UTC

[GitHub] [incubator-tvm] hypercubestart opened a new issue #5096: [Realy][RFC] Enhanced debugging for Relay pass

hypercubestart opened a new issue #5096: [Realy][RFC] Enhanced debugging for Relay pass
URL: https://github.com/apache/incubator-tvm/issues/5096
 
 
   # Motivation
   
   Working and discussing with @MarisaKirisame , we ran into a reoccurring issue when developing Relay passes: it is unclear whether a failed pass is at fault or an earlier pass which may have corrupted the AST. This makes errors in Relay passes harder to locate, especially when complexity grows as more passes are developed within the community.
   
   Thus, if a pass fails, we want a way to check whether the input AST was bad or the pass itself is wrong based on the specific pass.
   
   Currently, there is no design for pass-dependent checks. Ex. quantization does not support control flow. This RFC proposes to add a method for Relay pass developers/maintainers to specify pre/post conditions that can be called by Relay's Pass Manager to provide more detailed debugging whenever the pass fails.
   
   # Proposed Design
   
   Our main concern is creating a design that can be easily used by Relay pass developers/maintainers since these are the folks who have enough in-depth knowledge about the specific pass to write code checking the preconditions and postconditions. Thus, I propose to add `check` function within the Pass object. By default, it will have the weakest specification so that passes that haven't implemented check will still work, but developers will be able to override this function such that pass-specific checks can be used by the PassManager.
   
   # Unsolved Problem:
   
   - How should this function be passed into `CreateFunctionPass`/`CreateModulePass`/`CreateSequentialPass`
   
   I'm fairly new to the TVM codebase, so any critical feedback is much appreciated.
   @tqchen @zhiics @jroesch @MarisaKirisame @slyubomirsky 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services