onnxruntime
fb19cebe - webgpu: Fix multi-session GPU profiling event attribution (#27689)

Commit
9 days ago
webgpu: Fix multi-session GPU profiling event attribution (#27689) WebGpuContext is shared across sessions on the same device. Previously, GPU profiling events from all sessions were accumulated in a single events_ vector. When EndProfiling() was called, ALL GPU events went to whichever session called it last, causing: - Encoder trace files to have 0 GPU events - Decoder trace files to contain GPU events from both sessions Fix: Replace the shared events_ vector with a per_session_events_ map keyed by profiler pointer. CollectProfilingData() now takes a profiler key parameter to store GPU events under the correct session. EndProfiling() returns only events belonging to the requesting session. This correctly isolates GPU profiling data per-session for encoder-decoder models like Whisper that use multiple ORT sessions on the same WebGPU device.
Author
Parents
Loading