#include <ComputationResult.h>
Public Member Functions | |
| ComputationResult () | |
| ComputationResult (const std::string &kernelFunction) | |
| ComputationResult (const ComputationResult &other) | |
| void | SetDurationData (const Nanoseconds duration, const Nanoseconds overhead, const Nanoseconds compilationOverhead, const Nanoseconds profilingOverhead=0, const Nanoseconds preciseMeasurementOverhead=0) |
| void | SetSizeData (const DimensionVector &globalSize, const DimensionVector &localSize) |
| void | SetCompilationData (std::unique_ptr< KernelCompilationData > data) |
| void | SetProfilingData (std::unique_ptr< KernelProfilingData > data) |
| void | SetPowerUsage (const uint32_t powerUsage) |
| void | SetTemperature (const double powerUsage) |
| void | SetSMFrequency (const uint32_t frequency) |
| void | SetMemoryFrequency (const uint32_t frequency) |
| void | SetFanSpeed (const int32_t fanSpeed) |
| void | SetDurationStdev (const double durationStdev) |
| const std::string & | GetKernelFunction () const |
| const DimensionVector & | GetGlobalSize () const |
| const DimensionVector & | GetLocalSize () const |
| Nanoseconds | GetDuration () const |
| Nanoseconds | GetOverhead () const |
| Nanoseconds | GetCompilationOverhead () const |
| Nanoseconds | GetProfilingOverhead () const |
| Nanoseconds | GetPreciseMeasurementOverhead () const |
| bool | HasCompilationData () const |
| const KernelCompilationData & | GetCompilationData () const |
| bool | HasProfilingData () const |
| const KernelProfilingData & | GetProfilingData () const |
| bool | HasRemainingProfilingRuns () const |
| bool | HasPowerData () const |
| bool | HasTemperatureData () const |
| bool | HasSMFrequencyData () const |
| bool | HasMemoryFrequencyData () const |
| bool | HasFanSpeedData () const |
| uint32_t | GetPowerUsage () const |
| double | GetTemperature () const |
| uint32_t | GetSMFrequency () const |
| uint32_t | GetMemoryFrequency () const |
| int32_t | GetFanSpeed () const |
| double | GetEnergyConsumption () const |
| bool | HasDurationStdevData () const |
| double | GetDurationStdev () const |
| ComputationResult & | operator= (const ComputationResult &other) |
Class which holds result data from a single kernel definition run such as duration, overhead and profiling data.
| ktt::ComputationResult::ComputationResult | ( | ) |
Constructor which creates empty invalid computation result.
|
explicit |
Constructor which creates computation result for the specified kernel function.
| kernelFunction | Name of kernel function tied to the result. |
| ktt::ComputationResult::ComputationResult | ( | const ComputationResult & | other | ) |
Copy constructor.
| other | Result from which the data will be copied. |
| const KernelCompilationData & ktt::ComputationResult::GetCompilationData | ( | ) | const |
Retrieves kernel compilation data. Should only be called after prior check for valid data.
| Nanoseconds ktt::ComputationResult::GetCompilationOverhead | ( | ) | const |
Returns overhead related to kernel function compilation.
| Nanoseconds ktt::ComputationResult::GetDuration | ( | ) | const |
Returns raw kernel duration reported by the underlying compute API.
| double ktt::ComputationResult::GetDurationStdev | ( | ) | const |
Retrieves duration standard deviation in nanoseconds. Should only be called after prior check for valid data.
| double ktt::ComputationResult::GetEnergyConsumption | ( | ) | const |
Retrieves total energy consumption in joules. Should only be called after prior check for valid data.
| int32_t ktt::ComputationResult::GetFanSpeed | ( | ) | const |
Retrieves average fan speed in RPM. Should only be called after prior check for valid data.
| const DimensionVector & ktt::ComputationResult::GetGlobalSize | ( | ) | const |
Returns global thread size with which the kernel was launched.
| const std::string & ktt::ComputationResult::GetKernelFunction | ( | ) | const |
Returns name of a kernel function tied to the result.
| const DimensionVector & ktt::ComputationResult::GetLocalSize | ( | ) | const |
Returns local thread size with which the kernel was launched.
| uint32_t ktt::ComputationResult::GetMemoryFrequency | ( | ) | const |
Retrieves average memory frequency in MHz. Should only be called after prior check for valid data.
| Nanoseconds ktt::ComputationResult::GetOverhead | ( | ) | const |
Returns overhead related to kernel launch such as kernel function compilation and profiling data collection.
| uint32_t ktt::ComputationResult::GetPowerUsage | ( | ) | const |
Retrieves average power usage in milliwats. Should only be called after prior check for valid data.
| Nanoseconds ktt::ComputationResult::GetPreciseMeasurementOverhead | ( | ) | const |
Returns overhead of the precise multi-run measurement loop.
| const KernelProfilingData & ktt::ComputationResult::GetProfilingData | ( | ) | const |
Retrieves kernel profiling data. Should only be called after prior check for valid data.
| Nanoseconds ktt::ComputationResult::GetProfilingOverhead | ( | ) | const |
Returns overhead related to profiling data collection.
| uint32_t ktt::ComputationResult::GetSMFrequency | ( | ) | const |
Retrieves average SM frequency in MHz. Should only be called after prior check for valid data.
| double ktt::ComputationResult::GetTemperature | ( | ) | const |
Retrieves average temperature in degrees of Celsius. Should only be called after prior check for valid data.
| bool ktt::ComputationResult::HasCompilationData | ( | ) | const |
Checks whether result contains valid compilation data.
| bool ktt::ComputationResult::HasDurationStdevData | ( | ) | const |
Checks whether result contains valid duration standard deviation data.
| bool ktt::ComputationResult::HasFanSpeedData | ( | ) | const |
Checks whether result contains valid fan speed data.
| bool ktt::ComputationResult::HasMemoryFrequencyData | ( | ) | const |
Checks whether result contains valid memory frequency data.
| bool ktt::ComputationResult::HasPowerData | ( | ) | const |
Checks whether result contains valid power usage data.
| bool ktt::ComputationResult::HasProfilingData | ( | ) | const |
Checks whether result contains valid profiling data.
| bool ktt::ComputationResult::HasRemainingProfilingRuns | ( | ) | const |
Checks whether more kernel runs under the corresponding configuration need to be performed before profiling data contains valid information.
| bool ktt::ComputationResult::HasSMFrequencyData | ( | ) | const |
Checks whether result contains valid SM frequency data.
| bool ktt::ComputationResult::HasTemperatureData | ( | ) | const |
Checks whether result contains valid processor temperature data.
| ComputationResult & ktt::ComputationResult::operator= | ( | const ComputationResult & | other | ) |
Copy assignment operator.
| other | Result from which the data will be copied. |
| void ktt::ComputationResult::SetCompilationData | ( | std::unique_ptr< KernelCompilationData > | data | ) |
Fills compilation data for the result.
| data | Compilation data generated by the compute API. See KernelCompilationData for more information. |
| void ktt::ComputationResult::SetDurationData | ( | const Nanoseconds | duration, |
| const Nanoseconds | overhead, | ||
| const Nanoseconds | compilationOverhead, | ||
| const Nanoseconds | profilingOverhead = 0, |
||
| const Nanoseconds | preciseMeasurementOverhead = 0 |
||
| ) |
Fills duration data for the result.
| duration | Raw kernel duration, usually reported by the underlying compute API. |
| overhead | Overhead related to kernel launch such as kernel function compilation. |
| compilationOverhead | Overhead related purely to kernel function compilation. |
| profilingOverhead | Overhead related to profiling data collection. |
| preciseMeasurementOverhead | Overhead of the precise multi-run measurement loop. |
| void ktt::ComputationResult::SetDurationStdev | ( | const double | durationStdev | ) |
Fills duration standard deviation for the result.
| durationStdev | Standard deviation of kernel duration samples in nanoseconds. |
| void ktt::ComputationResult::SetFanSpeed | ( | const int32_t | fanSpeed | ) |
Fills fan speed for the result.
| fanSpeed | Fan speed in RPM generated by the compute API. -1 if not supported. |
| void ktt::ComputationResult::SetMemoryFrequency | ( | const uint32_t | frequency | ) |
Fills Memory frequency for the result.
| frequency | Frequency of memory data (MHz) generated by the compute API. |
| void ktt::ComputationResult::SetPowerUsage | ( | const uint32_t | powerUsage | ) |
Fills power usage for the result.
| powerUsage | Power usage data (milliwats) generated by the compute API. |
| void ktt::ComputationResult::SetProfilingData | ( | std::unique_ptr< KernelProfilingData > | data | ) |
Fills profiling data for the result.
| data | Profiling data generated by the compute API. See KernelProfilingData for more information. |
| void ktt::ComputationResult::SetSizeData | ( | const DimensionVector & | globalSize, |
| const DimensionVector & | localSize | ||
| ) |
Fills thread size data for the result.
| globalSize | Global thread size with which the kernel was launched. |
| localSize | Local thread size with which the kernel was launched. |
| void ktt::ComputationResult::SetSMFrequency | ( | const uint32_t | frequency | ) |
Fills SM frequency for the result.
| frequency | Frequency of SM data (MHz) generated by the compute API. |
| void ktt::ComputationResult::SetTemperature | ( | const double | temperature | ) |
Fills processor temperature for the result.
| temperature | Temperature data (Celsius) generated by the compute API. |