|
Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_BASE_TIMER_HPP_
6 #define GKO_PUBLIC_CORE_BASE_TIMER_HPP_
12 #include <ginkgo/core/base/executor.hpp>
56 CUevent_st* cuda_event;
57 GKO_HIP_EVENT_STRUCT* hip_event;
58 sycl::event* dpcpp_event;
59 std::chrono::steady_clock::time_point chrono;
83 virtual ~
Timer() =
default;
138 std::shared_ptr<const Executor> exec);
142 virtual void init_time_point(
time_point& time) = 0;
157 void init_time_point(
time_point& time)
override;
176 CudaTimer(std::shared_ptr<const CudaExecutor> exec);
179 void init_time_point(
time_point& time)
override;
183 CUstream_st* stream_;
202 HipTimer(std::shared_ptr<const HipExecutor> exec);
205 void init_time_point(
time_point& time)
override;
209 GKO_HIP_STREAM_STRUCT* stream_;
223 DpcppTimer(std::shared_ptr<const DpcppExecutor> exec);
226 void init_time_point(
time_point& time)
override;
236 #endif // GKO_PUBLIC_CORE_BASE_TIMER_HPP_
A timer using events for timing on a HipExecutor.
Definition: timer.hpp:193
A timer using std::chrono::steady_clock for timing.
Definition: timer.hpp:147
virtual void wait(time_point &time)=0
Waits until all kernels in-process when recording the time point are finished.
virtual std::chrono::nanoseconds difference_async(const time_point &start, const time_point &stop)=0
Computes the difference between the two time points in nanoseconds.
void record(time_point &time) override
Records a time point at the current time.
std::chrono::nanoseconds difference_async(const time_point &start, const time_point &stop) override
Computes the difference between the two time points in nanoseconds.
An opaque wrapper for a time point generated by a timer.
Definition: timer.hpp:21
time_point create_time_point()
Returns a newly created time point.
void record(time_point &time) override
Records a time point at the current time.
std::chrono::nanoseconds difference(time_point &start, time_point &stop)
Computes the difference between the two time points in nanoseconds.
A timer using kernels for timing on a DpcppExecutor in profiling mode.
Definition: timer.hpp:214
Represents a generic timer that can be used to record time points and measure time differences on hos...
Definition: timer.hpp:81
void wait(time_point &time) override
Waits until all kernels in-process when recording the time point are finished.
void wait(time_point &time) override
Waits until all kernels in-process when recording the time point are finished.
void wait(time_point &time) override
Waits until all kernels in-process when recording the time point are finished.
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
A timer using events for timing on a CudaExecutor.
Definition: timer.hpp:167
std::chrono::nanoseconds difference_async(const time_point &start, const time_point &stop) override
Computes the difference between the two time points in nanoseconds.
void record(time_point &time) override
Records a time point at the current time.
std::chrono::nanoseconds difference_async(const time_point &start, const time_point &stop) override
Computes the difference between the two time points in nanoseconds.
static std::unique_ptr< Timer > create_for_executor(std::shared_ptr< const Executor > exec)
Creates the timer type most suitable for recording accurate timings of kernels on the given executor.
void record(time_point &time) override
Records a time point at the current time.
void wait(time_point &time) override
Waits until all kernels in-process when recording the time point are finished.
std::chrono::nanoseconds difference_async(const time_point &start, const time_point &stop) override
Computes the difference between the two time points in nanoseconds.
virtual void record(time_point &time)=0
Records a time point at the current time.