timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
|
NVprof-style hardware counters via the CUpti callback API. Collecting these hardware counters has a higher overhead than the new CUpti Profiling API (tim::component::cupti_profiler). However, there are currently some issues with nesting the Profiling API and it is currently recommended to use this component for NVIDIA hardware counters in timemory. The callback API / NVprof is quite specific about the distinction between an "event" and a "metric". For your convenience, timemory removes this distinction and events can be specified arbitrarily as metrics and vice-versa and this component will sort them into their appropriate category. For the full list of the available events/metrics, use timemory-avail -H
from the command-line.
More...
#include "timemory/components/cupti/cupti_counters.hpp"
Public Types | |
using | value_type = cupti::profiler::results_t |
using | this_type = cupti_counters |
using | base_type = base< cupti_counters, value_type > |
using | size_type = std::size_t |
using | string_t = std::string |
using | kernel_data_t = cupti::result |
using | entry_type = typename value_type::value_type |
using | results_t = cupti::profiler::results_t |
using | kernel_results_t = cupti::profiler::kernel_results_t |
using | strvec_t = std::vector< string_t > |
using | profptr_t = std::shared_ptr< cupti::profiler > |
using | tuple_type = std::tuple< int, strvec_t, strvec_t > |
using | event_func_t = std::function< strvec_t()> |
using | metric_func_t = std::function< strvec_t()> |
using | device_func_t = std::function< int()> |
using | get_initializer_t = std::function< tuple_type()> |
using | secondary_type = std::unordered_multimap< std::string, value_type > |
template<typename Tp > | |
using | array_t = std::vector< Tp > |
using | storage_type = empty_storage |
Public Member Functions | |
cupti_counters () | |
~cupti_counters ()=default | |
cupti_counters (const cupti_counters &)=default | |
cupti_counters (cupti_counters &&) noexcept=default | |
cupti_counters & | operator= (const cupti_counters &rhs) |
cupti_counters & | operator= (cupti_counters &&) noexcept=default |
void | start () |
void | stop () |
string_t | get_display () const |
std::vector< double > | get () const |
secondary_type | get_secondary () const |
this_type & | operator+= (const this_type &rhs) |
this_type & | operator-= (const this_type &rhs) |
this_type & | operator+= (const results_t &rhs) |
template<typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Static Public Member Functions | |
static event_func_t & | get_event_initializer () |
static metric_func_t & | get_metric_initializer () |
static device_func_t & | get_device_initializer () |
static get_initializer_t & | get_initializer () |
static void | configure () |
static void | configure (int device, const strvec_t &events, const strvec_t &metrics={}) |
explicitly configure for a device and set of events/metrics. More... | |
static void | global_init () |
static void | global_finalize () |
static const profptr_t & | get_profiler () |
static const strvec_t & | get_events () |
static const strvec_t & | get_metrics () |
static int | get_device () |
static const strvec_t & | get_labels () |
static int64_t | unit () |
static string_t | label () |
static string_t | description () |
static string_t | display_unit () |
static value_type | record () |
static array_t< string_t > | label_array () |
static array_t< string_t > | description_array () |
static array_t< string_t > | display_unit_array () |
static array_t< int64_t > | unit_array () |
template<typename Archive > | |
static void | extra_serialization (Archive &ar) |
static void | cleanup () |
template<typename... Args> | |
static opaque | get_opaque (Args &&...) |
Static Public Attributes | |
static const short | precision = 3 |
static const short | width = 8 |
NVprof-style hardware counters via the CUpti callback API. Collecting these hardware counters has a higher overhead than the new CUpti Profiling API (tim::component::cupti_profiler). However, there are currently some issues with nesting the Profiling API and it is currently recommended to use this component for NVIDIA hardware counters in timemory. The callback API / NVprof is quite specific about the distinction between an "event" and a "metric". For your convenience, timemory removes this distinction and events can be specified arbitrarily as metrics and vice-versa and this component will sort them into their appropriate category. For the full list of the available events/metrics, use timemory-avail -H
from the command-line.
Definition at line 70 of file cupti_counters.hpp.
using tim::component::cupti_counters::array_t = std::vector<Tp> |
Definition at line 336 of file cupti_counters.hpp.
Definition at line 75 of file cupti_counters.hpp.
using tim::component::cupti_counters::device_func_t = std::function<int()> |
Definition at line 93 of file cupti_counters.hpp.
using tim::component::cupti_counters::entry_type = typename value_type::value_type |
Definition at line 81 of file cupti_counters.hpp.
using tim::component::cupti_counters::event_func_t = std::function<strvec_t()> |
Definition at line 91 of file cupti_counters.hpp.
using tim::component::cupti_counters::get_initializer_t = std::function<tuple_type()> |
Definition at line 95 of file cupti_counters.hpp.
using tim::component::cupti_counters::kernel_data_t = cupti::result |
Definition at line 80 of file cupti_counters.hpp.
using tim::component::cupti_counters::kernel_results_t = cupti::profiler::kernel_results_t |
Definition at line 83 of file cupti_counters.hpp.
using tim::component::cupti_counters::metric_func_t = std::function<strvec_t()> |
Definition at line 92 of file cupti_counters.hpp.
using tim::component::cupti_counters::profptr_t = std::shared_ptr<cupti::profiler> |
Definition at line 87 of file cupti_counters.hpp.
using tim::component::cupti_counters::results_t = cupti::profiler::results_t |
Definition at line 82 of file cupti_counters.hpp.
using tim::component::cupti_counters::secondary_type = std::unordered_multimap<std::string, value_type> |
Definition at line 325 of file cupti_counters.hpp.
using tim::component::cupti_counters::size_type = std::size_t |
Definition at line 78 of file cupti_counters.hpp.
|
inherited |
Definition at line 66 of file declaration.hpp.
using tim::component::cupti_counters::string_t = std::string |
Definition at line 79 of file cupti_counters.hpp.
using tim::component::cupti_counters::strvec_t = std::vector<string_t> |
Definition at line 86 of file cupti_counters.hpp.
Definition at line 74 of file cupti_counters.hpp.
using tim::component::cupti_counters::tuple_type = std::tuple<int, strvec_t, strvec_t> |
Definition at line 89 of file cupti_counters.hpp.
using tim::component::cupti_counters::value_type = cupti::profiler::results_t |
Definition at line 73 of file cupti_counters.hpp.
|
inline |
|
default |
|
default |
|
defaultnoexcept |
|
inlinestatic |
Definition at line 658 of file cupti_counters.hpp.
|
inlinestatic |
Definition at line 135 of file cupti_counters.hpp.
References get().
Referenced by cupti_counters(), tim::component::gpu_roofline< Types >::configure(), global_init(), and record().
|
inlinestatic |
explicitly configure for a device and set of events/metrics.
Definition at line 142 of file cupti_counters.hpp.
|
inlinestatic |
Definition at line 195 of file cupti_counters.hpp.
Definition at line 368 of file cupti_counters.hpp.
References label_array().
|
inlinestatic |
Definition at line 196 of file cupti_counters.hpp.
Referenced by tim::component::gpu_roofline< Types >::display_unit().
Definition at line 373 of file cupti_counters.hpp.
References get_labels().
|
inlinestatic |
Definition at line 468 of file cupti_counters.hpp.
|
inline |
Definition at line 315 of file cupti_counters.hpp.
References tim::component::base< cupti_counters, cupti::profiler::results_t >::load().
Referenced by configure().
|
inlinestatic |
Definition at line 158 of file cupti_counters.hpp.
|
inlinestatic |
Definition at line 116 of file cupti_counters.hpp.
References tim::cupti_device.
Referenced by get_initializer().
|
inline |
Definition at line 284 of file cupti_counters.hpp.
References tim::component::base< Tp, Value >::get_format_flags(), tim::component::base< Tp, Value >::get_precision(), tim::component::base< Tp, Value >::get_width(), tim::component::base< cupti_counters, cupti::profiler::results_t >::load(), tim::os, and tim::invoke::print().
|
inlinestatic |
Definition at line 100 of file cupti_counters.hpp.
References tim::cupti_events, and tim::delimit().
Referenced by get_initializer().
|
inlinestatic |
Definition at line 156 of file cupti_counters.hpp.
|
inlinestatic |
Definition at line 126 of file cupti_counters.hpp.
References get_device_initializer(), get_event_initializer(), and get_metric_initializer().
|
inlinestatic |
Definition at line 159 of file cupti_counters.hpp.
Referenced by display_unit_array(), and unit_array().
|
inlinestatic |
Definition at line 108 of file cupti_counters.hpp.
References tim::cupti_metrics, and tim::delimit().
Referenced by get_initializer().
|
inlinestatic |
Definition at line 157 of file cupti_counters.hpp.
|
inlinestaticinherited |
Definition at line 72 of file declaration.hpp.
|
inlinestatic |
Definition at line 155 of file cupti_counters.hpp.
|
inline |
Definition at line 327 of file cupti_counters.hpp.
|
inlinestatic |
Definition at line 153 of file cupti_counters.hpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 194 of file cupti_counters.hpp.
Definition at line 341 of file cupti_counters.hpp.
Referenced by tim::component::gpu_roofline< Types >::configure(), and description_array().
Definition at line 423 of file cupti_counters.hpp.
Definition at line 386 of file cupti_counters.hpp.
Definition at line 406 of file cupti_counters.hpp.
|
inline |
Definition at line 180 of file cupti_counters.hpp.
|
defaultnoexcept |
|
inlinestatic |
Definition at line 198 of file cupti_counters.hpp.
References configure(), and TIMEMORY_ERROR_FUNCTION_MACRO.
Referenced by tim::component::gpu_roofline< Types >::record(), start(), and stop().
|
inline |
Definition at line 447 of file cupti_counters.hpp.
References tim::component::base< cupti_counters, cupti::profiler::results_t >::laps.
|
inline |
|
inline |
Definition at line 240 of file cupti_counters.hpp.
References record().
|
inlinestatic |
Definition at line 192 of file cupti_counters.hpp.
Referenced by tim::component::gpu_roofline< Types >::unit().
|
inlinestatic |
Definition at line 381 of file cupti_counters.hpp.
References get_labels().
|
static |
Definition at line 97 of file cupti_counters.hpp.
|
static |
Definition at line 98 of file cupti_counters.hpp.