Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Utility][Relax] Implemented InjectDebugCallback transform #17282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 19, 2024

  1. [Utility][Relax] Implemented InjectDebugCallback transform

    In general, intermediate values produced while evaluating Relax
    functions are not visible to an end user.  While this provides
    stronger guarantees to the compiler, it can make debugging difficult.
    For example, if an end-to-end model is producing incorrect results, it
    can be difficult to determine which step of the model first introduced
    an error.
    
    This commit implements `relax.transform.InjectDebugCallback`, which
    adds a `debug_callback` parameter to each externally-exposed function
    of an `IRModule`.  This callback is called with the name and value of
    each variable binding within the function bodies, allowing
    error-checking to be added.  For example, a binding of `B =
    R.add(A,A)` would be followed by `debug_callback("B", B)`.
    Lunderberg committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    575cdc5 View commit details
    Browse the repository at this point in the history