[jit] fix `index_put_` error in subscript assignment (#38378)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/27493
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38378
Test Plan: `pytest ./test/test_jit.py -k test_tensor_subscript_assign`
Differential Revision: D21540489
Pulled By: jansel
fbshipit-source-id: a06e55175942b9d51ccc51d5440b7b122481b333