Change list striding kernel implementation to handle optional integers (#58536)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/58536
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D28531720
Pulled By: tugsbayasgalan
fbshipit-source-id: c06a8933aa9b4aa562ea65ac2558353b05d0f624