The GitHub Actions job "tvm-bot" on tvm.git/main has succeeded.
Run started by GitHub user anusha975 (triggered by anusha975).

Head commit for run:
1499bdae5950b7bcaa585df4e736b894d11768f1 / Masahiro Hiramori 
<[email protected]>
[Relax][PyTorch] Fix crash on dynamic shapes with identity slice in 
ExportedProgram importer (#18903)

Fixes `TypeError: 'NoneType' object is not iterable` when importing
models with dynamic batch dimensions that contain identity slices (e.g.,
`x[:, :H, :W, :]` on a dynamic batch dim).

**Root cause:** `aten.slice.Tensor(x, 0, 0, INT_MAX)` (an identity slice
on a dynamic dim `s`) produces a result with shape `[T.min(INT_MAX, s),
...]` instead of `[s, ...]`. When this is combined with the original
tensor via `add`, TVM cannot unify the shapes, resulting in
`struct_info.shape = None`. Any subsequent `view`/`reshape` then crashes
calling `list(None)`.

This pattern appears in models like `swin_t`, where shifted window
attention crops padded features with `x[:, :H, :W, :].contiguous()`.

**Changes:**
- `exported_program_translator.py`: Skip `strided_slice` for identity
slices (`start=0, end>=INT_MAX, step=1`) and return the input tensor
directly.
- `base_fx_graph_translator.py`: Guard the identity-reshape check in
`_reshape` against `None` shape.

Report URL: https://github.com/apache/tvm/actions/runs/23034667224

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to