← Back to events
ActiveTechRelease

trunk/41d1dafad77d67ebbdcfcbb7228a7b179308ce45: I preserve Python equality semantics in Dynamo range.index (#196711)

Photo: PyTorch Releases

What happened

torch.compile does not preserve Python's range.index() behavior. custom equality and numeric matches do not work consistently, this fix adddresses this. Issue Related to #195901 : test_range.py::RangeTest::test_index . I address this listed failure, not the entire tracking issue. Summary I preserve CPython's range.index() equality semantics in Dynamo: I keep the arithmetic fast path for exact integers and booleans,…

Summary assembled by rule from the sources below

Why it's spreading

Sources