trunk/b74c3864e80a297ab81441720f8215970ae049e4: [dynamo] Support bytearray.append() and extend() (#199675)
- PyTorch: 2442 events in the last 90 days
- PyTorch: 2409th Release in the last 90 days
- Previous: earlier the same day · trunk/0f70ba77a0a852de219834715079daa2710f0698: [MPS] Run test_unary_ufuncs on MPS (#200952)
What happened
ByteArrayVariable had no append/extend, so calling either on a bytearray graph broke. This adds both to tp_methods. Both follow the existing in-place ops on ByteArrayVariable (+=, *=, %=): build the result in a new buffer, record the mutation with side_effects, and swap self.data. For a bytearray that came in as an input, the existing bytearray_mutation replay handler writes the result back with old[:] = new after t…
Summary assembled by rule from the sources below