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

[Relax] Easier use of Function.bind_params with relax.op.create.* #17323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 16, 2024

  1. [Relax] Easier use of Function.bind_params with relax.op.create.*

    The `Function.bind_params` method requires all bound values to have
    `StructInfo` annotations.  While these are generated on construction
    for `relax::Constant` and `relax::PrimValue`, the most common cases of
    bound values, other useful expression such as
    `relax.op.zeros(shape,dtype)` do not have `StructInfo` until they are
    normalized.  In addition, because `Function.bind_params` may be used
    in contexts that do not have a `relax.BlockBuilder` available,
    performing this normalization is not straightforward.
    
    This commit updates the constructors for Relax operations within the
    `tvm.relax.op.create` namespace to infer their `StructInfo` on
    construction, if it is possible to do so.  This allows these
    operations to be used inside `Function.bind_params`.
    Lunderberg committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b40070d View commit details
    Browse the repository at this point in the history
  2. ci bump

    Lunderberg committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    72ee4f6 View commit details
    Browse the repository at this point in the history