Change VmapTransforms to use SmallVector instead of `vector<int64_t>` (#40042)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40042
See title. Dynamic allocations are generally bad for performance. This
change was not benchmarked because we have not gotten to the stage where
we want to benchmark performance.
Test Plan: - `./build/bin/vmap_test`
Differential Revision: D22070656
Pulled By: zou3519
fbshipit-source-id: f6cf74a357bb52b75c0a02f1f82495c0a5329a28