Repository navigation
[FIX][Relax] Guard unknown tensor shapes in VMShapeLower - #20345
ruiling-smartbear wants to merge 2 commits into
Conversation
Only apply the static-shape shortcut when a ShapeExpr exists. Keep unknown tensor shapes on the existing runtime-check path and cover bundled symbolic parameters.
3233f40 to
e8a968f
Compare
|
I checked this on top of current
extent: T.int64,
weight: R.Tensor([extent], "float32"), # noqa: F821This needs |
wwoosshh
left a comment
There was a problem hiding this comment.
Thanks for the update. I re-checked f38615db7 merged onto current main (d55759e): all 12 tests in tests/python/relax/test_backend_transform_shape_lower.py pass, both new tests crash when vm_shape_lower.cc is reverted to main, and pre-commit passes on the changed files.
LGTM.
Fixes #20335.
The static-shape shortcut dereferenced a missing
ShapeExprfor unknown-shape tensor fields. Guard that shortcut and keep the existing runtime checks. Add coverage for unknown-shape tuple parameters and the reportedBundleModelParams → VMShapeLowersequence.Validation on Linux CPU / LLVM 16, based on
cc0f9f07and its pinned TVM FFI:-11).InternalErrorat VM codegen instead of crashing; this does not add Prim-parameter execution support.