Skip to content

Conversation

@PatrikPerssonInceptron
Copy link
Contributor

@PatrikPerssonInceptron PatrikPerssonInceptron commented Feb 28, 2025

The c++ implementation of BindParams can accept tvm.relax.Constants, however the python interface assert only allows ndarrays. I added tvm.relax.Constant to the assert.

By allowing tvm.relax.Constants as input arguments to BindParams it is possible to avoid duplicating weights if there are several functions in the module that are using the same weight as an input parameter, such as prefill and decode in an LLM.

Copy link
Member

@yongwww yongwww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls fix the ci lint issue

@yongwww yongwww merged commit ef7b7ad into apache:main Mar 3, 2025
14 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
…17693)

* updated the assert in BindParams to allow tvm.relax.Constant in the input dictionary

* fixed linting
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.

2 participants