ProfilingContext#

Fully qualified name: cupva_utils::ProfilingContext

Defined in src/host_utils/core/include/cupva_host_utils.hpp

class ProfilingContext : public cupva::DynamicStorage<impl::ProfilingContext>#

Profiling Context.

Public Functions

ProfilingContext()#

ProfilingContext default ctor.

ProfilingContext(ProfilingContext &&obj)#

ProfilingContext move constructor.

ProfilingContext &operator=(ProfilingContext &&obj) &#

ProfilingContext move assignment.

~ProfilingContext() noexcept#

ProfilingContext destructor.

ProfilingStatistics getStatistics(ProfilingBatchStatType const type)#

Get profiling statistics in nanoseconds from a context given a profiling statistics type.

While collecting statistics the fence should not be a part of the batch you are collecting stats on. Thus ensure data collection is completed by submitting the fence in a separate batch.

Throws:

cupva::Exception(InvalidArgument) – An invalid type was provided.

Parameters:

type – Profiling statistics type.

Returns:

The reference to Profiling Statictics object.

ProfilingStatistics getStatistics(
cupva::CmdProgram const &prog,
ProfilingProgramStatType const type,
)#

Get per CmdProgram statistics in nanoseconds from a context given a profiling statistics type.

While collecting statistics the fence should not be a part of the batch you are collecting stats on. Thus ensure data collection is completed by submitting the fence in a separate batch.

Parameters:
  • type – Profiling statistics type.

  • prog – CmdProgram whose statistics are to be retrieved.

Throws:
  • cupva::Exception(InvalidArgument) – An invalid program was provided.

  • cupva::Exception(InvalidArgument) – An invalid type was provided.

Returns:

The reference to Profiling Statictics object.

ProfilingStatistics getStatistics(
cupva::Executable const &exec,
ProfilingProgramStatType const type,
)#

Get per Executable statistics in nanoseconds from a context given a profiling statistics type.

While collecting statistics the fence should not be a part of the batch you are collecting stats on. Thus ensure data collection is completed by submitting the fence in a separate batch.

Parameters:
  • type – Profiling statistics type.

  • exec – Executable whose statistics are to be retrieved.

Throws:
  • cupva::Exception(InvalidArgument) – An invalid executable was provided.

  • cupva::Exception(InvalidArgument) – An invalid type was provided.

Returns:

The reference to Profiling Statictics object.

void reset()#

Reset profiling statistics in the context.

The statistics data will be accumulated in the context on each submission until reset() is called.

Public Static Functions

static ProfilingContext Create()#

Construct a new profiling Context object.

Returns:

Allocated profiling Context.