struct dnnl::threadpool_interop::threadpool_event_iface_t#
Overview#
Completion event interface for async threadpool work. More…
#include <dnnl_threadpool_iface.hpp> struct threadpool_event_iface_t { // methods virtual bool is_complete() const = 0; virtual void wait() const = 0; virtual double exec_time_ms() const = 0; };
Detailed Documentation#
Completion event interface for async threadpool work. oneDNN’s verbose profiler polls these to determine when deferred execution has finished and to extract timing information.
Methods#
virtual bool is_complete() const = 0
Returns true if the associated work has completed.
virtual void wait() const = 0
Blocks until completion.
virtual double exec_time_ms() const = 0
Measured execution time in milliseconds. Valid only after completion. Should reflect wall-clock duration from when the first worker begins to when the last worker finishes. Use a compare-and-swap atomic operation to stamp the start time so only the first worker records the asynchronous completion callback once all workers have finished.