ProfilingContext#

Fully qualified name: cupva_utils::ProfilingContext

Defined in cupva_host_utils.hpp

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

Profiling Context.

  • Maturity: GA

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.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Throws:

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

Parameters:

type – Profiling statistics type.

Returns:

The reference to Profiling Statictics object.

Pre:

None

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.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

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.

Pre:

None

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.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

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.

Pre:

None

void reset()#

Reset profiling statistics in the context.

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

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Pre:

None

Public Static Functions

static ProfilingContext Create()#

Construct a new profiling Context object.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Returns:

Allocated profiling Context.

Pre:

None