SIGN IN SIGN UP

Access last element of vector for current input details (#2393)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/2393

In pybindings when iterating on the inputs, preparing them for execution we were using the index `i` to access sizes, dim_order, strides etc. of the current tensor being iterated on. This worked previously because all our inputs were all always tensors.

In the seamless model we ran into a case where the inputs are a mixed tuple of tensors and constants (int's). In this case index `i` is not accurate anymore when accessing `input_tensors` to get the current tensor being operated on because we haven't pushed `i` number of tensors into the `input_tensors` vector as some of the inputs till now were non-tensors.

Reviewed By: iseeyuan

Differential Revision: D54836802

fbshipit-source-id: 07a2c2bd11087db058becad058c97ea3af305b85
T
Tarun Karuturi committed
e98a7e053cfb3b8c5e7bd0c76f9831a7f192d24b
Parent: 57237cd
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 3/14/2024, 7:03:45 AM