This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch manylinux-ci-836
in repository https://gitbox.apache.org/repos/asf/tvm-tirx.git


The following commit(s) were added to refs/heads/manylinux-ci-836 by this push:
     new f50e6a7c7 [TIRx] Keep tensor view alive while adding shape constraints
f50e6a7c7 is described below

commit f50e6a7c717ed1f00a477ccff65a67acce1ed21e
Author: Tianqi Chen <[email protected]>
AuthorDate: Mon Oct 26 02:32:09 2026 +0000

    [TIRx] Keep tensor view alive while adding shape constraints
---
 src/tirx/ir/stmt_functor_with_constraint_context.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tirx/ir/stmt_functor_with_constraint_context.cc 
b/src/tirx/ir/stmt_functor_with_constraint_context.cc
index 1efafb9f3..dca507580 100644
--- a/src/tirx/ir/stmt_functor_with_constraint_context.cc
+++ b/src/tirx/ir/stmt_functor_with_constraint_context.cc
@@ -29,7 +29,8 @@ namespace tirx {
 void StmtExprMutatorWithConstraintContext::AddParamConstraints(const Function& 
func) {
   for (const Var& param : func->params) {
     if (!param->ty.as<TensorTypeObj>()) continue;
-    for (PrimExpr shape : param.as_or_throw<TensorVar>().shape()) {
+    TensorVar tensor = param.as_or_throw<TensorVar>();
+    for (PrimExpr shape : tensor.shape()) {
       constraints->Append(sym::PredicateConstraint(shape >= 
prim::MakeConst(shape.ty(), 0)));
     }
   }

Reply via email to