[JIT]Support List variable in adv indexing. (#37966)
Summary:
Followup of https://github.com/pytorch/pytorch/issues/37848 I realized that it's better to condition on `Value` type instead of token type. So now it also support indexing through list variables (used to be list literal only).
Also apparently our eager frontend accept indexing with float list as well, so matched this edge case behavior as well.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37966
Reviewed By: suo
Differential Revision: D21439642
Pulled By: ailzhang
fbshipit-source-id: cedb8431ef38747d4aa9909a6bbf8e954dbe0e25