trunk/c8bb60779d0c8878e64a0b20b74fc66643f2baba: [MPS] Keep stream command-buffer state on the serial queue (#197836)
- PyTorch: 1356 events in the last 90 days
- PyTorch: 1339th Release in the last 90 days
- Previous: earlier the same day · ciflow/trunk/198298
What happened
MPSStream serializes GPU work through a per-stream serial dispatch queue, and commandEncoder() / endKernelCoalescing() / commit() all mutate the stream's _commandBuffer and _commandEncoder . Several callers touched that state from the calling thread instead, so a second thread running MPS ops concurrently could have its encoder ended and released mid-use: SIGSEGV binding a released encoder, "A command encoder is alr…
Summary assembled by rule from the sources below