[Static Runtime] Support __getitem__ for lists (#63398)
authorMike Iovine <mikeiovine@fb.com>
Thu, 19 Aug 2021 13:37:44 +0000 (06:37 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 19 Aug 2021 13:38:51 +0000 (06:38 -0700)
commit47a9e8ff320b638fcff0e25147e7f042740bf734
treefad6c7c0e4982b406ad0610263bf025ae8c1d2a1
parentce61100923b3b423a8c0dbbda4d551d0c1e8c358
[Static Runtime] Support __getitem__ for lists (#63398)

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

This change provides a native `__getitem__` implementation for lists to avoid overhead associated with falling back to the JIT interpreter.

Test Plan: Unit tests: `buck test //caffe2/benchmarks/static_runtime:static_runtime_cpptest`

Reviewed By: hlu1

Differential Revision: D30368464

fbshipit-source-id: e0e0971508cd5d9bcf6025606993dc24ecbf6764
benchmarks/static_runtime/test_scripts.h
benchmarks/static_runtime/test_static_runtime.cc
torch/csrc/jit/runtime/static/native_ops.cpp