cuda-api-wrappers icon indicating copy to clipboard operation
cuda-api-wrappers copied to clipboard

Introduce an event pair class?

Open eyalroz opened this issue 3 years ago • 0 comments

CUDA has almost now APIs which regard pairs of events. There's certainly no CUDA driver or runtime struct fort representing event pairs. Consequently, I have no event pair wrapper.

... and yet... event pairs do show up. Timing using events is only defined on pairs of events. Which also motivated #399. In other words, an event pair type has already snuck in to our codebase. So, perhaps we should flesh it out into a full-fledged class?

  • Let the user create an event pair rather than creating two events separately
  • Offer some kind of wrapped enqueue mechanism for streams, where the two events are used to denote the start and end of the enqueued work
  • ... what else?

I have a single decent usage scenario, a second scenario of questionable generality, and... what else? Is this enough for a full-fledged class?

eyalroz avatar Sep 09 '22 17:09 eyalroz