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.
tim::component::ncclp_handle< Toolset, Tag > Struct Template Reference

#include "timemory/components/gotcha/ncclp.hpp"

+ Collaboration diagram for tim::component::ncclp_handle< Toolset, Tag >:

Public Types

using value_type = void
 
using this_type = ncclp_handle< Toolset, Tag >
 
using base_type = base< this_type, value_type >
 
using string_t = std::string
 
using nccl_toolset_t = Toolset
 
using ncclp_gotcha_t = tim::component::gotcha< ncclp_wrapper_count, nccl_toolset_t, Tag >
 
using ncclp_tuple_t = tim::component_tuple< ncclp_gotcha_t >
 
using toolset_ptr_t = std::shared_ptr< ncclp_tuple_t >
 
using storage_type = empty_storage
 

Public Member Functions

void get ()
 
void start ()
 
void stop ()
 
int get_count ()
 
void get () const
 

Static Public Member Functions

static string_t label ()
 
static string_t description ()
 
template<typename... Args>
static opaque get_opaque (Args &&...)
 

Static Public Attributes

static constexpr size_t ncclp_wrapper_count = 15
 

Detailed Description

template<typename Toolset, typename Tag>
struct tim::component::ncclp_handle< Toolset, Tag >

Definition at line 75 of file ncclp.hpp.

Member Typedef Documentation

◆ base_type

Definition at line 81 of file ncclp.hpp.

◆ nccl_toolset_t

Definition at line 84 of file ncclp.hpp.

◆ ncclp_gotcha_t

◆ ncclp_tuple_t

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ string_t

template<typename Toolset , typename Tag >
using tim::component::ncclp_handle< Toolset, Tag >::string_t = std::string

Definition at line 83 of file ncclp.hpp.

◆ this_type

Definition at line 80 of file ncclp.hpp.

◆ toolset_ptr_t

template<typename Toolset , typename Tag >
using tim::component::ncclp_handle< Toolset, Tag >::toolset_ptr_t = std::shared_ptr<ncclp_tuple_t>

Definition at line 88 of file ncclp.hpp.

◆ value_type

template<typename Toolset , typename Tag >
using tim::component::ncclp_handle< Toolset, Tag >::value_type = void

Definition at line 79 of file ncclp.hpp.

Member Function Documentation

◆ description()

template<typename Toolset , typename Tag >
static string_t tim::component::ncclp_handle< Toolset, Tag >::description ( )
inlinestatic

Definition at line 91 of file ncclp.hpp.

91{ return "Handle for activating NCCL wrappers"; }

◆ get() [1/2]

template<typename Toolset , typename Tag >
void tim::component::ncclp_handle< Toolset, Tag >::get ( )
inline

Definition at line 93 of file ncclp.hpp.

93{}

Referenced by tim::component::ncclp_handle< Toolset, Tag >::stop().

◆ get() [2/2]

void tim::component::empty_base::get ( ) const
inlineinherited

Definition at line 69 of file declaration.hpp.

69{}

◆ get_count()

template<typename Toolset , typename Tag >
int tim::component::ncclp_handle< Toolset, Tag >::get_count ( )
inline

Definition at line 115 of file ncclp.hpp.

115{ return get_tool_count().load(); }

◆ get_opaque()

template<typename... Args>
static opaque tim::component::empty_base::get_opaque ( Args &&  ...)
inlinestaticinherited

Definition at line 72 of file declaration.hpp.

73 {
74 return opaque{};
75 }

◆ label()

template<typename Toolset , typename Tag >
static string_t tim::component::ncclp_handle< Toolset, Tag >::label ( )
inlinestatic

Definition at line 90 of file ncclp.hpp.

90{ return "ncclp_handle"; }

◆ start()

template<typename Toolset , typename Tag >
void tim::component::ncclp_handle< Toolset, Tag >::start ( )
inline

Definition at line 95 of file ncclp.hpp.

96 {
97 if(get_tool_count()++ == 0)
98 {
99 get_tool_instance() = std::make_shared<ncclp_tuple_t>("timemory_ncclp");
100 get_tool_instance()->start();
101 }
102 }

◆ stop()

template<typename Toolset , typename Tag >
void tim::component::ncclp_handle< Toolset, Tag >::stop ( )
inline

Definition at line 104 of file ncclp.hpp.

105 {
106 auto idx = --get_tool_count();
107 if(get_tool_instance().get())
108 {
109 get_tool_instance()->stop();
110 if(idx == 0)
111 get_tool_instance().reset();
112 }
113 }

References tim::component::ncclp_handle< Toolset, Tag >::get().

Member Data Documentation

◆ ncclp_wrapper_count

template<typename Toolset , typename Tag >
constexpr size_t tim::component::ncclp_handle< Toolset, Tag >::ncclp_wrapper_count = 15
staticconstexpr

Definition at line 77 of file ncclp.hpp.


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