xpu
xpu::timings Class Reference

Timing information collected via xpu::push_timer and xpu::pop_timer. More...

Public Member Functions

 timings ()=default
 
std::string_view name () const
 
double wall () const
 
double copy (direction dir) const
 
double memset () const
 
template<typename K >
kernel_timings kernel () const
 
std::vector< kernel_timingskernels () const
 
double kernel_time () const
 
std::vector< timingschildren () const
 
bool has_details () const
 
double throughput () const
 
double throughput_kernels () const
 
double throughput_copy (direction dir) const
 
double throughput_memset () const
 
void merge (const timings &other)
 
 timings (detail::timings t)
 

Detailed Description

Timing information collected via xpu::push_timer and xpu::pop_timer.

See also
xpu::push_timer, xpu::pop_timer, xpu::kernel_timings

Constructor & Destructor Documentation

◆ timings() [1/2]

xpu::timings::timings ( )
default

◆ timings() [2/2]

xpu::timings::timings ( detail::timings  t)
inlineexplicit

Member Function Documentation

◆ children()

std::vector<timings> xpu::timings::children ( ) const

Returns all child timers.

◆ copy()

double xpu::timings::copy ( direction  dir) const
inline

Time spent in memcpy operations.

Parameters
dirDirection of the copy.
Note
Requires profiling to enabled when calling xpu::initialize.

◆ has_details()

bool xpu::timings::has_details ( ) const
inline

Returns true if copy, memset and kernel timings were collected.

◆ kernel()

template<typename K >
kernel_timings xpu::timings::kernel ( ) const
inline

Time spent in kernel executions.

Note
Requires profiling to enabled when calling xpu::initialize.

◆ kernel_time()

double xpu::timings::kernel_time ( ) const
inline
Returns
The total time spent in kernels. [ms]

◆ kernels()

std::vector<kernel_timings> xpu::timings::kernels ( ) const

Returns all kernel timings for this timer.

Note
Requires profiling to enabled when calling xpu::initialize.

◆ memset()

double xpu::timings::memset ( ) const
inline

Time spent in memset operations.

Note
Requires profiling to enabled when calling xpu::initialize.

◆ merge()

void xpu::timings::merge ( const timings other)
inline

Merges the given timings into this one.

◆ name()

std::string_view xpu::timings::name ( ) const
inline

Name of this timer.

◆ throughput()

double xpu::timings::throughput ( ) const

Returns the total throughput. [GB/s] Input size is calculated via xpu::t_add_bytes .

◆ throughput_copy()

double xpu::timings::throughput_copy ( direction  dir) const

Returns the throughput of copy operations in the given direction, [GB/s]

◆ throughput_kernels()

double xpu::timings::throughput_kernels ( ) const

Returns the throughput of kernel executions. [GB/s]

◆ throughput_memset()

double xpu::timings::throughput_memset ( ) const

Returns the throughput of memset operations. [GB/s]

◆ wall()

double xpu::timings::wall ( ) const
inline

Total (wall) time spent in this timer.

Note
This time is always collected, regardless of profiling being enabled or not.

The documentation for this class was generated from the following file: