Skip to content

Conversation

@FilipFan
Copy link

This commit resolves two errors encountered when running the code in colab:

  1. TypeError in relax.Var constructor: Fixed the TypeError: struct_info needs to be an instance of StructInfo by correctly wrapping the tensor shape and dtype in a relax.TensorStructInfo object, as required by the relax.Var constructor.

  2. AttributeError during build: Fixed the AttributeError: module 'tvm.runtime.relax_vm' has no attribute 'build' by changing the build function call from relax.vm.build to the correct relax.build.

Test: Manually in the colab.

This commit resolves two errors encountered when running the code in colab:

1.  **TypeError in `relax.Var` constructor:**
    Fixed the `TypeError: struct_info needs to be an instance of StructInfo`
    by correctly wrapping the tensor shape and dtype in a
    `relax.TensorStructInfo` object, as required by the `relax.Var`
    constructor.

2.  **AttributeError during build:**
    Fixed the `AttributeError: module 'tvm.runtime.relax_vm' has no
    attribute 'build'` by changing the build function call from
    `relax.vm.build` to the correct `relax.build`.

Test: Manually in the colab.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant