[PyTorch] Avoid extra std::vector in parseSchemaOrName (#64678)
authorScott Wolchok <swolchok@fb.com>
Wed, 15 Sep 2021 16:55:02 +0000 (09:55 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 15 Sep 2021 16:56:41 +0000 (09:56 -0700)
commitbdbc622988ad9abb22622235bf3f4ad7a9e7ea30
tree9a2f487be0bb1be52a79052e91362c32e98014b8
parent0f1bccb6928037ca1d1751d62b099016fab0e792
[PyTorch] Avoid extra std::vector in parseSchemaOrName (#64678)

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

We know we only want one declaration, so let's not create an excess std::vector (and thus a heap allocation) for that.
ghstack-source-id: 138036978

Test Plan: CI

Reviewed By: dhruvbird, tugsbayasgalan

Differential Revision: D30813785

fbshipit-source-id: c67e0100cdef5d894282939fb6d39a57309bc240
torch/csrc/jit/frontend/function_schema_parser.cpp