tvm
tvm copied to clipboard
[Relax][Backend] Fix TVM crashes with default relax pipeline when opt_level=1: InternalError: Check failed: (slot->value_computed) is false
Hi Commiters,
This PR is trying to fix issues https://github.com/apache/tvm/issues/17876. Any suggestions would be appreciated if you are available.
Root Cause
VMShapeLower crashed when processing ShapeExpr containing composite PrimExpr that weren't computed yet.
Solution
~~Modified VisitExpr_(const ShapeExprNode* op) in vm_shape_lower.cc to:~~
~~1. Mark uncomputed variables as ready for computation~~
~~2. Trigger EmitOutstandingPrimExprCompute() to resolve the dependency chain~~
~~3. Ensure all expressions are computed before calling MakeSymbolicShapeArg~~
~~Added test case: test_composite_shape_expression_fix() to prevent future occurrences.~~
symbolizing the composite PrimExpr in the pipeline: canonicalization