forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
GPAInternalCountersGfx8_Tonga.h
69 lines (57 loc) · 2.79 KB
/
GPAInternalCountersGfx8_Tonga.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//==============================================================================
// Copyright (c) 2010-2018 Advanced Micro Devices, Inc. All rights reserved.
/// \author AMD Developer Tools Team
/// \file
/// \brief Internal counter definitions for GFX8_TONGA
//==============================================================================
#ifndef _GPA_INTERNAL_COUNTERS_GFX8_TONGA_H_
#define _GPA_INTERNAL_COUNTERS_GFX8_TONGA_H_
// This file is autogenerated by the ConvertHWEnums project
#include "GPAInternalCounter.h"
#include "GPAInternalCountersGfx8.h"
namespace CounterGfx8_Tonga
{
/// Uses the input ASIC type to determine if this data provides an ASIC specific version.
/// \param asicType The ASIC type that is currently in use.
/// \return True if the ASIC is matched by this file.
inline bool MatchAsic(GDT_HW_ASIC_TYPE asicType)
{
static std::set<GDT_HW_ASIC_TYPE> asicsSupported = { GDT_TONGA };
if (asicsSupported.find(asicType) == asicsSupported.end())
{
return false;
}
return true;
}
extern GPA_HardwareCounterDesc VGT0countersGfx8_Tonga []; ///< Array of internal counters for VGT0 block for Gfx8_Tonga family
extern GPA_HardwareCounterDesc VGT1countersGfx8_Tonga []; ///< Array of internal counters for VGT1 block for Gfx8_Tonga family
extern GPA_HardwareCounterDesc VGT2countersGfx8_Tonga []; ///< Array of internal counters for VGT2 block for Gfx8_Tonga family
extern GPA_HardwareCounterDesc VGT3countersGfx8_Tonga []; ///< Array of internal counters for VGT3 block for Gfx8_Tonga family
/// Replaces count number of block instance counters at the destination with the overriding source counters.
/// \param pDestCounter Destination to update.
/// \param pSrcCounter Source to update from.
/// \param count Number of counters to update.
inline void ReplaceBlockInstanceCounters(GPA_HardwareCounterDesc* pDestCounter, GPA_HardwareCounterDesc* pSrcCounter, uint32_t count)
{
for (uint32_t i = 0; i < count; i++)
{
pDestCounter[i] = pSrcCounter[i];
}
}
/// If the requested ASIC type is supported, then the global GPU generation block instance counters are updated.
/// \param asicType The ASIC type that is currently in use.
/// \return True if the ASIC is matched by this file and block instances are updated, otherwise false.
inline bool OverrideBlockInstanceCounters(GDT_HW_ASIC_TYPE asicType)
{
if (!MatchAsic(asicType))
{
return false;
}
ReplaceBlockInstanceCounters(VGT0countersGfx8, VGT0countersGfx8_Tonga, 147);
ReplaceBlockInstanceCounters(VGT1countersGfx8, VGT1countersGfx8_Tonga, 147);
ReplaceBlockInstanceCounters(VGT2countersGfx8, VGT2countersGfx8_Tonga, 147);
ReplaceBlockInstanceCounters(VGT3countersGfx8, VGT3countersGfx8_Tonga, 147);
return true;
}
} // CounterGfx8_Tonga
#endif // _GPA_INTERNAL_COUNTERS_GFX8_TONGA_H_