onnxruntime
968fbe87 - [CUDA plugin] Fix graph-stream ownership intent and drop dangling scratch Stream*

Commit
29 days ago
[CUDA plugin] Fix graph-stream ownership intent and drop dangling scratch Stream* - PerThreadContext: derive graph-stream ownership from explicit use_external_stream intent instead of (external_stream == nullptr), so a user-selected CUDA default stream (cudaStream_t(0)) combined with CUDA graph is treated as external/user-owned and not destroyed. - GetScratchBuffer: stop forwarding a stack-temporary PluginStreamShim Stream* to the stream-aware arena. A plugin kernel only has the raw cudaStream_t, not the framework OrtSyncStream* the arena persists per chunk and later dereferences, so the temporary would dangle and be type-confused. Pass a null stream; capture stability comes from arena chunk reuse, and the CUDA graph path runs on a single unified stream. - Reconcile arena/cuda-graph plugin docs with the null-stream scratch behavior.
Author
Parents
Loading