Skip to content

[ARITH] Expose allow_override parameter in Python Analyzer.bind()#19417

Open
fpedd wants to merge 1 commit intoapache:mainfrom
fpedd:fpedd/arith/expose-bind-allow-override
Open

[ARITH] Expose allow_override parameter in Python Analyzer.bind()#19417
fpedd wants to merge 1 commit intoapache:mainfrom
fpedd:fpedd/arith/expose-bind-allow-override

Conversation

@fpedd
Copy link
Copy Markdown

@fpedd fpedd commented Apr 17, 2026

The C++ Analyzer::Bind() already supports allow_override, but the FFI bridge always used the default (false). This change threads the optional argument through the FFI layer and the Python wrapper so callers can rebind variables without triggering an error.

The C++ Analyzer::Bind() already supports allow_override, but the FFI
bridge always used the default (false). This change threads the optional
argument through the FFI layer and the Python wrapper so callers can
rebind variables without triggering an error.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an optional allow_override parameter to the Analyzer.bind method, allowing users to update existing variable bindings. The changes include updates to the Python API, the C++ FFI layer, and the addition of a unit test to verify the new functionality. A review comment suggests removing an unnecessary return statement in the Python implementation to align with the method's None return type hint.

Comment thread python/tvm/arith/analyzer.py
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