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

[TIR] More hygenic TVM_SREF macros #12607

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Commits on Aug 25, 2022

  1. [TIR] More hygenic TVM_SREF macros

    Previously, the `TVM_SREF_TO_BLOCK`, `TVM_SREF_TO_FOR`, and
    `TVM_TYPE_AS` macros required both the input and output variables.
    The input variable name is useful for improving the error message
    returned, but the output variable name isn't necessary for this
    functionality, and prevents the macro from being used as part of an
    expression.
    
    * Generate an immediately-invoked lambda expression to allow for an
      independently-scoped `result` variable.
    
    * Use parentheses around the input argument, in case the sref is
      the result of an expression.
    
    * Update all call sites to remove the macro argument providing the
      first argument.
    Lunderberg committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    7f7c50e View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. Configuration menu
    Copy the full SHA
    abe7e20 View commit details
    Browse the repository at this point in the history