Kernel Tuning Toolkit 2.3
 
Loading...
Searching...
No Matches
ktt::KernelResult Class Reference

#include <KernelResult.h>

Public Member Functions

 KernelResult ()
 
 KernelResult (const std::string &kernelName, const KernelConfiguration &configuration, const std::string &timestamp)
 
 KernelResult (const std::string &kernelName, const KernelConfiguration &configuration, const std::vector< ComputationResult > &results, const std::string &timestamp)
 
void SetStatus (const ResultStatus status)
 
void SetExtraDuration (const Nanoseconds duration)
 
void SetExtraOverhead (const Nanoseconds overhead)
 
void SetDataMovementOverhead (const Nanoseconds overhead)
 
void SetValidationOverhead (const Nanoseconds overhead)
 
void SetSearcherOverhead (const Nanoseconds overhead)
 
void SetFailedKernelOverhead (const Nanoseconds overhead)
 
void SetProfilingRunsOverhead (const Nanoseconds overhead)
 
void SetProfilingOverhead (const Nanoseconds overhead)
 
void SetPreciseMeasurementOverhead (const Nanoseconds overhead)
 
const std::string & GetKernelName () const
 
const std::vector< ComputationResult > & GetResults () const
 
const std::string & GetTimestamp () const
 
const KernelConfigurationGetConfiguration () const
 
ResultStatus GetStatus () const
 
Nanoseconds GetKernelDuration () const
 
Nanoseconds GetKernelOverheadFromCompResults () const
 
Nanoseconds GetKernelOverhead () const
 
Nanoseconds GetKernelOverheadFirstPass () const
 
Nanoseconds GetCompilationOverheadFromCompResults () const
 
Nanoseconds GetExtraDuration () const
 
Nanoseconds GetExtraDurationFirstPass () const
 
Nanoseconds GetExtraOverhead () const
 
Nanoseconds GetDataMovementOverhead () const
 
Nanoseconds GetValidationOverhead () const
 
Nanoseconds GetSearcherOverhead () const
 
Nanoseconds GetFailedKernelOverhead () const
 
Nanoseconds GetProfilingRunsOverhead () const
 
Nanoseconds GetProfilingInfrastructureOverhead () const
 
Nanoseconds GetProfilingOverheadFromCompResults () const
 
Nanoseconds GetPreciseMeasurementOverheadFromCompResults () const
 
Nanoseconds GetProfilingOverhead () const
 
Nanoseconds GetPreciseMeasurementOverhead () const
 
Nanoseconds GetProfilingTotalOverhead () const
 
Nanoseconds GetCompilationOverhead () const
 
Nanoseconds GetTotalDuration () const
 
Nanoseconds GetTotalOverhead () const
 
bool IsValid () const
 
bool HasRemainingProfilingRuns () const
 
void FuseProfilingTimes (const KernelResult &previousResult, bool first)
 
void CopyProfilingTimes (const KernelResult &originalResult)
 
void TransferPowerData (const KernelResult &previousResult)
 

Detailed Description

Class which holds aggregate result data from kernel computation such as individual computation results, configuration and status.

Constructor & Destructor Documentation

◆ KernelResult() [1/3]

ktt::KernelResult::KernelResult ( )

Constructor which creates empty invalid kernel result.

◆ KernelResult() [2/3]

ktt::KernelResult::KernelResult ( const std::string &  kernelName,
const KernelConfiguration configuration,
const std::string &  timestamp 
)
explicit

Constructor which creates kernel result for the specified kernel and configuration.

Parameters
kernelNameName of a kernel tied to the result.
configurationConfiguration tied to the result.
timestampTimestamp tied to this kernel run.

◆ KernelResult() [3/3]

ktt::KernelResult::KernelResult ( const std::string &  kernelName,
const KernelConfiguration configuration,
const std::vector< ComputationResult > &  results,
const std::string &  timestamp 
)
explicit

Constructor which creates kernel result for the specified kernel and configuration. Also fills partial results.

Parameters
kernelNameName of a kernel tied to the result.
configurationConfiguration tied to the result.
resultsPartial results from all kernel definition runs under the kernel launch.
timestampTimestamp tied to the kernel run.

Member Function Documentation

◆ CopyProfilingTimes()

void ktt::KernelResult::CopyProfilingTimes ( const KernelResult originalResult)

Copy overhead times collected from another KernelResult instance

Parameters
originalResultsource of overhead times

◆ FuseProfilingTimes()

void ktt::KernelResult::FuseProfilingTimes ( const KernelResult previousResult,
bool  first 
)

Fuse overhead times collected from multiple profiling executions

Parameters
previousResultresult of the previous run
firstsets whether the first instance of the kernel configuration was computed (we need to fuse overhead time, but do not count it as overhead of profiling).

◆ GetCompilationOverhead()

Nanoseconds ktt::KernelResult::GetCompilationOverhead ( ) const

Retrieves duration of kernels compilation.

Returns
Duration of kernels compilation.

◆ GetCompilationOverheadFromCompResults()

Nanoseconds ktt::KernelResult::GetCompilationOverheadFromCompResults ( ) const

Retrieves total kernel compilation overhead from the partial results.

Returns
Total kernel compilation overhead from the partial results.

◆ GetConfiguration()

const KernelConfiguration & ktt::KernelResult::GetConfiguration ( ) const

Retrieves kernel configuration tied to the result.

Returns
Kernel configuration tied to the result.

◆ GetDataMovementOverhead()

Nanoseconds ktt::KernelResult::GetDataMovementOverhead ( ) const

Retrieves duration of buffer transfers (e.g., between host and device memory).

Returns
Duration of buffer transfers.

◆ GetExtraDuration()

Nanoseconds ktt::KernelResult::GetExtraDuration ( ) const

Retrieves duration of a kernel launcher. The duration of buffer transfers performed within the launcher is not included.

Returns
Kernel launcher duration.

◆ GetExtraDurationFirstPass()

Nanoseconds ktt::KernelResult::GetExtraDurationFirstPass ( ) const

Retrieves extra duration of a kernel launcher from the first (non-profiling) pass.

Returns
Kernel launcher extra duration from the first pass.

◆ GetExtraOverhead()

Nanoseconds ktt::KernelResult::GetExtraOverhead ( ) const

Retrieves duration of buffer transfers (e.g., between host and device memory).

Deprecated:
Use GetDataMovementOverhead() instead.
Returns
Duration of buffer transfers.

◆ GetFailedKernelOverhead()

Nanoseconds ktt::KernelResult::GetFailedKernelOverhead ( ) const

Retrieves duration of failed (uncompilable) kernel creation.

Returns
Duration of KTT/compiler spent on preparation of kernel which cannot be executed.

◆ GetKernelDuration()

Nanoseconds ktt::KernelResult::GetKernelDuration ( ) const

Retrieves total kernel duration from the partial results.

Returns
Total kernel duration from the partial results.

◆ GetKernelName()

const std::string & ktt::KernelResult::GetKernelName ( ) const

Returns name of a kernel tied to the result.

Returns
Name of a kernel tied to the result.

◆ GetKernelOverhead()

Nanoseconds ktt::KernelResult::GetKernelOverhead ( ) const

Retrieves total kernel overhead.

Returns
Total kernel overhead.

◆ GetKernelOverheadFirstPass()

Nanoseconds ktt::KernelResult::GetKernelOverheadFirstPass ( ) const

Retrieves kernel overhead of the first pass under the same configuration.

Returns
Kernel overhead of the first pass under the same configuration.

◆ GetKernelOverheadFromCompResults()

Nanoseconds ktt::KernelResult::GetKernelOverheadFromCompResults ( ) const

Retrieves total kernel overhead from the partial results.

Returns
Total kernel overhead from the partial results.

◆ GetPreciseMeasurementOverhead()

Nanoseconds ktt::KernelResult::GetPreciseMeasurementOverhead ( ) const

Retrieves duration of the precise multi-run measurement loop.

Returns
Duration of the precise multi-run measurement loop.

◆ GetPreciseMeasurementOverheadFromCompResults()

Nanoseconds ktt::KernelResult::GetPreciseMeasurementOverheadFromCompResults ( ) const

Retrieves the sum of precise multi-run measurement overhead from the partial results.

Returns
Sum of precise measurement overhead across all partial results.

◆ GetProfilingInfrastructureOverhead()

Nanoseconds ktt::KernelResult::GetProfilingInfrastructureOverhead ( ) const

Retrieves duration of CUPTI initialization and data collection, but without data movement and extra duration, for all profiling passes.

Returns
Duration of profiling infrastructure, but without data movement and extra duration.

◆ GetProfilingOverhead()

Nanoseconds ktt::KernelResult::GetProfilingOverhead ( ) const

Retrieves duration of all non-kernel operations performed during collection performance counters (e.g., CUPTI infrastructure and data movements for extra kernel runs) for all profiling runs.

Returns
Duration operations different than kernel execution needed to collect performance counters.

◆ GetProfilingOverheadFromCompResults()

Nanoseconds ktt::KernelResult::GetProfilingOverheadFromCompResults ( ) const

Retrieves duration of all non-kernel operations performed during collection performance counters (e.g., data movements for extra kernel runs) from the partial results.

Returns
Duration of operations different than kernel execution needed to collect performance counters from the partial results.

◆ GetProfilingRunsOverhead()

Nanoseconds ktt::KernelResult::GetProfilingRunsOverhead ( ) const

Retrieves duration and overhead of kernels executed to collect performance counters.

Returns
Duration of kernels executed just to collect performance counters.

◆ GetProfilingTotalOverhead()

Nanoseconds ktt::KernelResult::GetProfilingTotalOverhead ( ) const

Retrieves duration and overhead of all operations needed to collect performance counters.

Returns
Duration of operations required just to collect performance counters.

◆ GetResults()

const std::vector< ComputationResult > & ktt::KernelResult::GetResults ( ) const

Retrieves partial results from computations performed as part of the kernel launch.

Returns
Partial results from computations. See ComputationResult for more information.

◆ GetSearcherOverhead()

Nanoseconds ktt::KernelResult::GetSearcherOverhead ( ) const

Retrieves duration of searcher finding the next configuration to run.

Returns
Duration of searcher finding the next configuration to run.

◆ GetStatus()

ResultStatus ktt::KernelResult::GetStatus ( ) const

Retrieves status of the kernel result.

Returns
Status of the kernel result. See ResultStatus for more information.

◆ GetTimestamp()

const std::string & ktt::KernelResult::GetTimestamp ( ) const

Returns the timestamp corresponding to the kernel run

Returns
Timestamp of the kernel run

◆ GetTotalDuration()

Nanoseconds ktt::KernelResult::GetTotalDuration ( ) const

Retrieves the sum of kernel duration and extra duration.

Returns
Sum of kernel duration and extra duration.

◆ GetTotalOverhead()

Nanoseconds ktt::KernelResult::GetTotalOverhead ( ) const

Retrieves the sum of kernel overhead, data movement, validation, searcher, precise measurement and profiling related overhead.

Returns
The sum of kernel overhead, data movement, validation, searcher, precise measurement and profiling related overhead.

◆ GetValidationOverhead()

Nanoseconds ktt::KernelResult::GetValidationOverhead ( ) const

Retrieves duration of kernel output validation.

Returns
Duration of kernel output validation.

◆ HasRemainingProfilingRuns()

bool ktt::KernelResult::HasRemainingProfilingRuns ( ) const

Checks whether more kernel runs under the corresponding configuration need to be performed before all of the partial results have profiling data with valid information.

Returns
True if more kernel runs need to be performed under the same configuration. False otherwise.

◆ IsValid()

bool ktt::KernelResult::IsValid ( ) const

Checks whether kernel result is valid. I.e., its status has value Ok.

Returns
True if kernel result is valid. False otherwise.

◆ SetDataMovementOverhead()

void ktt::KernelResult::SetDataMovementOverhead ( const Nanoseconds  overhead)

Sets duration of buffer transfers (e.g., between host and device memory).

Parameters
overheadDuration of buffer transfers.

◆ SetExtraDuration()

void ktt::KernelResult::SetExtraDuration ( const Nanoseconds  duration)

Sets duration of a kernel launcher. The duration of buffer transfers performed within the launcher is not included.

Parameters
durationKernel launcher duration.

◆ SetExtraOverhead()

void ktt::KernelResult::SetExtraOverhead ( const Nanoseconds  overhead)

Sets duration of buffer transfers (e.g., between host and device memory).

Deprecated:
Use SetDataMovementOverhead() instead.
Parameters
overheadDuration of buffer transfers.

◆ SetFailedKernelOverhead()

void ktt::KernelResult::SetFailedKernelOverhead ( const Nanoseconds  overhead)

Sets duration of failed (uncompilable) kernel creation.

Parameters
overheadDuration of KTT/compiler spent on preparation of kernel which cannot be executed.

◆ SetPreciseMeasurementOverhead()

void ktt::KernelResult::SetPreciseMeasurementOverhead ( const Nanoseconds  overhead)

Sets duration of the precise multi-run measurement loop.

Parameters
overheadDuration of the precise multi-run measurement loop.

◆ SetProfilingOverhead()

void ktt::KernelResult::SetProfilingOverhead ( const Nanoseconds  overhead)

Sets time of additional overhead (data movement and extra duration) to collect performance counters.

Parameters
overheadAdditional overhead of kernels executed just to collect performance counters.

◆ SetProfilingRunsOverhead()

void ktt::KernelResult::SetProfilingRunsOverhead ( const Nanoseconds  overhead)

Sets time of kernels executed to collect performance counters.

Parameters
overheadDuration of kernels executed just to collect performance counters.

◆ SetSearcherOverhead()

void ktt::KernelResult::SetSearcherOverhead ( const Nanoseconds  overhead)

Sets duration of searcher finding the next configuration to run.

Parameters
overheadDuration of searcher finding the next configuration to run.

◆ SetStatus()

void ktt::KernelResult::SetStatus ( const ResultStatus  status)

Sets kernel results status.

Parameters
statusResult status. See ResultStatus for more information.

◆ SetValidationOverhead()

void ktt::KernelResult::SetValidationOverhead ( const Nanoseconds  overhead)

Sets duration of kernel output validation.

Parameters
overheadDuration of kernel output validation.

◆ TransferPowerData()

void ktt::KernelResult::TransferPowerData ( const KernelResult previousResult)

Transfer power data collected from previous execution

Parameters
previousResultresult of the previous run

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