removing some redundant str splits (#106089)
drop some redundant string splits, no factual changes, just cleaning the codebase
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106089
Approved by: https://github.com/albanD, https://github.com/malfet