rocprofiler-sdk/profile_config.h Source File

rocprofiler-sdk/profile_config.h Source File#

Rocprofiler SDK Developer API: rocprofiler-sdk/profile_config.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
profile_config.h
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
4//
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in all
13// copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21// SOFTWARE.
22
23#pragma once
24
27#include <rocprofiler-sdk/fwd.h>
28
29ROCPROFILER_EXTERN_C_INIT
30
31/**
32 * @defgroup PROFILE_CONFIG Profile Configurations
33 * @brief Group one or more hardware counters into a unique handle
34 *
35 * @{
36 */
37
38/**
39 * @brief Create Profile Configuration. A profile is bound to an agent but can
40 * be used across many contexts. The profile has a fixed set of counters
41 * that are collected (and specified by counter_list). The available
42 * counters for an agent can be queried using
43 * @ref rocprofiler_iterate_agent_supported_counters. An existing profile
44 * may be supplied via config_id to use as a base for the new profile.
45 * All counters in the existing profile will be copied over to the new
46 * profile. The existing profile will remain unmodified and usable with
47 * the new profile id being returned in config_id.
48 *
49 * @param [in] agent_id Agent identifier
50 * @param [in] counters_list List of GPU counters
51 * @param [in] counters_count Size of counters list
52 * @param [in,out] config_id Identifier for GPU counters group. If an existing
53 profile is supplied, that profiles counters will be copied
54 over to a new profile (returned via this id)
55 * @return ::rocprofiler_status_t
56 * @retval ROCPROFILER_STATUS_SUCCESS if profile created
57 * @retval ROCPROFILER_STATUS_ERROR if profile could not be created
58 *
59 */
62 rocprofiler_counter_id_t* counters_list,
63 size_t counters_count,
64 rocprofiler_profile_config_id_t* config_id) ROCPROFILER_API
65 ROCPROFILER_NONNULL(4);
66
67/**
68 * @brief Destroy Profile Configuration.
69 *
70 * @param [in] config_id
71 * @return ::rocprofiler_status_t
72 * @retval ROCPROFILER_STATUS_SUCCESS if profile destroyed
73 * @retval ROCPROFILER_STATUS_ERROR if profile could not be destroyed
74 */
77
78/** @} */
79
80ROCPROFILER_EXTERN_C_FINI
rocprofiler_status_t
Status codes.
Definition fwd.h:53
Agent Identifier.
Definition fwd.h:578
Counter ID.
Definition fwd.h:586
Profile Configurations.
Definition fwd.h:595
rocprofiler_status_t rocprofiler_create_profile_config(rocprofiler_agent_id_t agent_id, rocprofiler_counter_id_t *counters_list, unsigned long counters_count, rocprofiler_profile_config_id_t *config_id)
Create Profile Configuration. A profile is bound to an agent but can be used across many contexts....
rocprofiler_status_t rocprofiler_destroy_profile_config(rocprofiler_profile_config_id_t config_id)
Destroy Profile Configuration.