SIGN IN SIGN UP

fix(backend/torch): handle SymInt/SymFloat in convert_to_tensor and slice (#22998)

- convert_to_tensor: handle scalar torch.SymInt/SymFloat directly
  via torch.as_tensor, avoiding the numpy path that fails with
  symbolic types during torch.export tracing.

- convert_to_tensor: handle list/tuple containing SymInt/SymFloat
  by using torch.as_tensor directly.

- slice: allow torch.SymInt in start_indices and shape for the
  Python slicing fast path, enabling proper dynamic shape tracing
  in torch.export.

- Add core_test.py with focused unit tests for all SymInt branches.
R
RAHUL KUMAR committed
e488861e6dfae09c339ae8fe3ce8306400b12609
Parent: 93b4e70
Committed by GitHub <noreply@github.com> on 5/27/2026, 11:42:38 PM