a061b7947f
- hosttrace library automatically collects and merges timestamps for HIP API calls and kernels with the host-side instrumentation - mostly eliminates the need for using external rocprof - added thread_instruction_count in perfetto output - increased hosttrace min_loop_address_range to 512 - disabled instrumenting functions with dynamic callsites by default - miscellaneous cmake updates * roctracer support - fully integrated perfetto + roctracer outputs - thread_instruction_count in perfetto - increased min_loop_address_range to 512 - disabled instrumenting functions with dynamic callsites by default - updated timemory submodule * hosttrace_launch_compiler - support for using an alternative compiler as needed via launch compiler - elfio added as submodule (not currently used) - miscellaneous cmake updates * README update + host/device categories + misc - timemory fix for TIMEMORY_ROCTRACER_ENABLED - transpose fix * papi_tuple_t -> papi_tot_ins - minor fix to Findroctracer.cmake
60 líneas
1.7 KiB
C++
60 líneas
1.7 KiB
C++
|
|
#pragma once
|
|
|
|
#include "timemory/api.hpp"
|
|
#include "timemory/components/base.hpp"
|
|
#include "timemory/components/data_tracker/components.hpp"
|
|
#include "timemory/components/macros.hpp"
|
|
#include "timemory/enum.h"
|
|
#include "timemory/macros/os.hpp"
|
|
#include "timemory/mpl/type_traits.hpp"
|
|
#include "timemory/mpl/types.hpp"
|
|
|
|
TIMEMORY_DECLARE_COMPONENT(roctracer)
|
|
|
|
#if !defined(HOSTTRACE_USE_ROCTRACER)
|
|
TIMEMORY_DEFINE_CONCRETE_TRAIT(is_available, component::roctracer, false_type)
|
|
#endif
|
|
|
|
namespace tim
|
|
{
|
|
namespace component
|
|
{
|
|
using roctracer_data = data_tracker<double, roctracer>;
|
|
|
|
struct roctracer
|
|
: base<roctracer, void>
|
|
, private policy::instance_tracker<roctracer, false>
|
|
{
|
|
using value_type = void;
|
|
using base_type = base<roctracer, void>;
|
|
using tracker_type = policy::instance_tracker<roctracer, false>;
|
|
|
|
TIMEMORY_DEFAULT_OBJECT(roctracer)
|
|
|
|
static void setup();
|
|
static void tear_down();
|
|
static void preinit();
|
|
static void global_init() { setup(); }
|
|
static void global_finalize() { tear_down(); }
|
|
|
|
void start();
|
|
void stop();
|
|
void set_prefix(const char* _v) { m_prefix = _v; }
|
|
|
|
private:
|
|
const char* m_prefix = nullptr;
|
|
};
|
|
} // namespace component
|
|
} // namespace tim
|
|
|
|
TIMEMORY_SET_COMPONENT_API(component::roctracer_data, project::timemory, category::timing,
|
|
os::supports_unix)
|
|
TIMEMORY_DEFINE_CONCRETE_TRAIT(is_timing_category, component::roctracer_data, true_type)
|
|
TIMEMORY_DEFINE_CONCRETE_TRAIT(uses_timing_units, component::roctracer_data, true_type)
|
|
|
|
#include "timemory/operations.hpp"
|
|
|
|
TIMEMORY_DECLARE_EXTERN_COMPONENT(roctracer, false, void)
|
|
TIMEMORY_DECLARE_EXTERN_COMPONENT(roctracer_data, true, double)
|