[ONNX] Relax constant_fold gather with indices rank > 1 (#68140) (#68493)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68493
Fixes #66786.
`index_select` only supports `index` of 1-D tensor. `ONNX::Gather` allows `index` to have rank `q`. Abort constant folding `ONNX::Gather` if `index` rank is larger than 1.
Test Plan: Imported from OSS
Reviewed By: jansel
Differential Revision: D32483826
Pulled By: msaroufim
fbshipit-source-id: a8e8389d85287a859d32abf8d8d98852290b0a03
Co-authored-by: BowenBao <bowbao@microsoft.com>