mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
dd5e6e8553
Merges startswith, endswith calls to into a single call that feeds in a tuple. Not only are these calls more readable, but it will be more efficient as it iterates through each string only once. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96754 Approved by: https://github.com/ezyang