[ONNX] Update narrow for dynamic inputs (#44039)
Summary:
Update narrow for dynamic inputs
Pull Request resolved: https://github.com/pytorch/pytorch/pull/44039
Reviewed By: mruberry
Differential Revision: D23742215
Pulled By: bzinodev
fbshipit-source-id: 0d58d2fe996f91a124af988a9a21ee433e842d07