trunk/c34b6eb9467e0924cbbe79208de91a8bb51d92e2: [CUDA] Pass device and stream to Python MemPool callbacks (#200427)
- PyTorch: 2130 events in the last 90 days
- PyTorch: 2101th Release in the last 90 days
- Previous: earlier the same day · trunk/2208903bd2a09f30786d54b3d2426c98013d0159: [Inductor] Add gfx950 FlyDSL FlexAttention forward (#194309)
What happened
Pass the allocation device and raw stream address directly to Python-backed MemPool allocation and free callbacks. Remove the implicit CUDAStreamGuard so callbacks can decide how to establish and use their CUDA context. Update the public callback signatures, documentation, examples, and tests. The explicit-stream test also verifies that invoking a callback does not change its current stream. Test Plan: python test/t…
Summary assembled by rule from the sources below