← Back to events
ActiveTechRelease

trunk/c34b6eb9467e0924cbbe79208de91a8bb51d92e2: [CUDA] Pass device and stream to Python MemPool callbacks (#200427)

Photo: PyTorch Releases

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

Why it's spreading

Sources