2022-07-17 21:52:09 -05:00
|
|
|
// MIT License
|
|
|
|
|
//
|
2024-12-13 18:48:39 -05:00
|
|
|
// Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved.
|
2022-07-17 21:52:09 -05:00
|
|
|
//
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
|
//
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in all
|
|
|
|
|
// copies or substantial portions of the Software.
|
|
|
|
|
//
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
|
// SOFTWARE.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-02-04 10:59:50 -06:00
|
|
|
#include "core/timemory.hpp"
|
2022-07-17 21:52:09 -05:00
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
#include <memory>
|
2022-07-17 21:52:09 -05:00
|
|
|
#include <vector>
|
|
|
|
|
|
2024-10-15 11:20:40 -04:00
|
|
|
namespace rocprofsys
|
2022-07-17 21:52:09 -05:00
|
|
|
{
|
2024-12-13 18:48:39 -05:00
|
|
|
namespace rocprofiler_sdk
|
2022-07-17 21:52:09 -05:00
|
|
|
{
|
2024-12-13 18:48:39 -05:00
|
|
|
using hardware_counter_info = ::tim::hardware_counters::info;
|
2022-07-17 21:52:09 -05:00
|
|
|
|
|
|
|
|
void
|
2024-12-13 18:48:39 -05:00
|
|
|
setup();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
|
|
|
|
void
|
2024-12-13 18:48:39 -05:00
|
|
|
shutdown();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
void
|
|
|
|
|
config();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
post_process();
|
|
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
void
|
|
|
|
|
sample();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
void
|
|
|
|
|
start();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
void
|
|
|
|
|
stop();
|
2022-07-17 21:52:09 -05:00
|
|
|
|
2024-12-13 18:48:39 -05:00
|
|
|
std::vector<hardware_counter_info>
|
|
|
|
|
get_rocm_events_info();
|
|
|
|
|
} // namespace rocprofiler_sdk
|
2024-10-15 11:20:40 -04:00
|
|
|
} // namespace rocprofsys
|