Files
TheRock/rocm-systems/projects/aqlprofile/gfxip/gfx11/gfx11_block_info.h
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

218 lines
8.8 KiB
C++

// MIT License
//
// Copyright (c) 2017-2025 Advanced Micro Devices, Inc.
//
// 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.
#ifndef _GFX11_BLOCKINFO_H_
#define _GFX11_BLOCKINFO_H_
namespace gfxip {
namespace gfx11 {
// To define GFX11 specific blocks info like GC caches blocks
// All common with GFX9 blocks are inherited from GFX9 space
// Enumeration of Gfx9 hardware counter blocks
enum CounterBlockId {
CbCounterBlockId,
CpcCounterBlockId,
CpfCounterBlockId,
CpgCounterBlockId,
DbCounterBlockId,
GdsCounterBlockId,
GrbmCounterBlockId,
GrbmSeCounterBlockId,
// IaCounterBlockId,
// PaScCounterBlockId,
// PaSuCounterBlockId,
SpiCounterBlockId,
SqCounterBlockId,
SqGsCounterBlockId,
// SqVsCounterBlockId,
SqPsCounterBlockId,
SqHsCounterBlockId,
SqCsCounterBlockId,
SxCounterBlockId,
TaCounterBlockId,
// TcaCounterBlockId,
// TccCounterBlockId,
// TcsCounterBlockId,
TdCounterBlockId,
// VgtCounterBlockId,
// WdCounterBlockId,
// MC blocks
GceaCounterBlockId,
// AtcCounterBlockId,
// AtcL2CounterBlockId,
// McVmL2CounterBlockId,
RpbCounterBlockId,
RmiCounterBlockId,
Gl1aCounterBlockId,
Gl1cCounterBlockId,
Gl2aCounterBlockId,
Gl2cCounterBlockId,
GcrCounterBlockId,
GusCounterBlockId,
// SDMA block
Sdma0CounterBlockId,
Sdma1CounterBlockId,
// UMC block
UmcCounterBlockId,
// Counters retrieved by KFD
IommuV2CounterBlockId,
KernelDriverCounterBlockId,
CpPipeStatsCounterBlockId,
TcpCounterBlockId,
HwInfoCounterBlockId,
FirstCounterBlockId = CbCounterBlockId,
LastCounterBlockId = HwInfoCounterBlockId,
};
/*
* SPM global and shader engine block IDs
*/
enum SpmGlobalBlockId {
SPM_GLOBAL_BLOCK_NAME_CPG = 0,
SPM_GLOBAL_BLOCK_NAME_CPC = 1,
SPM_GLOBAL_BLOCK_NAME_CPF = 2,
SPM_GLOBAL_BLOCK_NAME_GDS = 3,
SPM_GLOBAL_BLOCK_NAME_TCC = 4,
SPM_GLOBAL_BLOCK_NAME_TCA = 5,
SPM_GLOBAL_BLOCK_NAME_IA = 6,
SPM_GLOBAL_BLOCK_NAME_TCS = 7,
};
enum SpmSeBlockId {
SPM_SE_BLOCK_NAME_CB = 0,
SPM_SE_BLOCK_NAME_DB = 1,
SPM_SE_BLOCK_NAME_PA = 2,
SPM_SE_BLOCK_NAME_SX = 3,
SPM_SE_BLOCK_NAME_SC = 4,
SPM_SE_BLOCK_NAME_TA = 5,
SPM_SE_BLOCK_NAME_TD = 6,
SPM_SE_BLOCK_NAME_TCP = 7,
SPM_SE_BLOCK_NAME_SPI = 8,
SPM_SE_BLOCK_NAME_SQG = 9,
SPM_SE_BLOCK_NAME_VGT = 10,
};
// Number of block instances
static const uint32_t CbCounterBlockNumInstances = 4;
static const uint32_t DbCounterBlockNumInstances = 4;
static const uint32_t TaCounterBlockNumInstances = 16;
static const uint32_t TdCounterBlockNumInstances = 16;
static const uint32_t TcpCounterBlockNumInstances = 16;
static const uint32_t TcaCounterBlockNumInstances = 2;
static const uint32_t TccCounterBlockNumInstances = 16;
static const uint32_t SdmaCounterBlockNumInstances = 2;
// MI100 has 8 SDMA instances
static const uint32_t SdmaCounterBlockMaxInstances = 8;
static const uint32_t UmcCounterBlockMaxInstances = 32;
static const uint32_t RmiCounterBlockNumInstances = 8;
static const uint32_t GceaCounterBlockNumInstances = 16;
// Number of block counter registers
static const uint32_t CbCounterBlockNumCounters = 4;
static const uint32_t CpcCounterBlockNumCounters = 2;
static const uint32_t CpfCounterBlockNumCounters = 2;
static const uint32_t CpgCounterBlockNumCounters = 2;
static const uint32_t DbCounterBlockNumCounters = 4;
static const uint32_t GdsCounterBlockNumCounters = 4;
static const uint32_t GrbmCounterBlockNumCounters = 2;
static const uint32_t GrbmSeCounterBlockNumCounters = 4;
static const uint32_t IaCounterBlockNumCounters = 4;
static const uint32_t PaSuCounterBlockNumCounters = 4;
static const uint32_t PaScCounterBlockNumCounters = 8;
static const uint32_t RlcCounterBlockNumCounters = 2;
static const uint32_t SdmaCounterBlockNumCounters = 2;
static const uint32_t UmcCounterBlockNumCounters = 5;
static const uint32_t SpiCounterBlockNumCounters = 6;
static const uint32_t SqCounterBlockNumCounters = 8;
static const uint32_t SxCounterBlockNumCounters = 4;
static const uint32_t TaCounterBlockNumCounters = 2;
static const uint32_t TcaCounterBlockNumCounters = 4;
static const uint32_t TccCounterBlockNumCounters = 4;
static const uint32_t TcpCounterBlockNumCounters = 4;
static const uint32_t TdCounterBlockNumCounters = 2;
static const uint32_t VgtCounterBlockNumCounters = 4;
static const uint32_t WdCounterBlockNumCounters = 4;
static const uint32_t GceaCounterBlockNumCounters = 2;
static const uint32_t AtcCounterBlockNumCounters = 4;
static const uint32_t AtcL2CounterBlockNumCounters = 2;
static const uint32_t McVmL2CounterBlockNumCounters = 8;
static const uint32_t RpbCounterBlockNumCounters = 4;
static const uint32_t RmiCounterBlockNumCounters = 4;
static const uint32_t Gl1aCounterBlockNumCounters = 4;
static const uint32_t Gl1cCounterBlockNumCounters = 4;
static const uint32_t Gl2aCounterBlockNumCounters = 4;
static const uint32_t Gl2cCounterBlockNumCounters = 4;
static const uint32_t GcrCounterBlockNumCounters = 2;
static const uint32_t GusCounterBlockNumCounters = 2;
// Block counters max event value
static const uint32_t CbCounterBlockMaxEvent =
CB_PERF_SEL_EXPORT_KILLED_BY_NULL_TARGET_SHADER_MASK; // CB_PERF_SEL_CC_BB_BLEND_PIXEL_VLD;
static const uint32_t CpcCounterBlockMaxEvent = CPC_PERF_SEL_MEC_THREAD3;
static const uint32_t CpfCounterBlockMaxEvent = CPF_PERF_SEL_CP_SDMA_MNGR_SDMABUSY;
static const uint32_t CpgCounterBlockMaxEvent = CPG_PERF_SEL_PFP_VGTDMA_DB_ROQ_DATA_STALL1;
static const uint32_t DbCounterBlockMaxEvent = DB_PERF_SEL_OREO_Events_stalls;
static const uint32_t GdsCounterBlockMaxEvent = GDS_PERF_SEL_SE7_GS_WAVE_ID_VALID;
static const uint32_t GrbmCounterBlockMaxEvent = GRBM_PERF_SEL_CPAXI_BUSY;
static const uint32_t GrbmSeCounterBlockMaxEvent = GRBM_PERF_SEL_CPAXI_BUSY;
// static const uint32_t IaCounterBlockMaxEvent = ia_perf_utcl1_stall_utcl2_event;
// static const uint32_t PaSuCounterBlockMaxEvent = PERF_CLIENT_UTCL1_INFLIGHT;
static const uint32_t PaScCounterBlockMaxEvent =
SC_SPI_WAVE_STALLED_BY_SPI; // SC_DB1_TILE_INTERFACE_CREDIT_AT_MAX_WITH_NO_PENDING_SEND;
static const uint32_t RlcCounterBlockMaxEvent = 7;
static const uint32_t SdmaCounterBlockMaxEvent = 15; // SDMA_PERF_SEL_MMHUB_TAG_DELAY_COUNTER;
static const uint32_t SpiCounterBlockMaxEvent = SPI_PERF_BUSY; // SC_SC_SPI_EVENT;
static const uint32_t SqCounterBlockMaxEvent = SQ_PERF_SEL_NONE2; // SQC_PERF_SEL_DUMMY_LAST;
static const uint32_t SxCounterBlockMaxEvent =
SX_PERF_SEL_DB3_4X2_DISCARD; // SX_PERF_SEL_DB3_SIZE;
// static const uint32_t TaCounterBlockMaxEvent = TA_PERF_SEL_first_xnack_on_phase3;
// static const uint32_t TcaCounterBlockMaxEvent = TCA_PERF_SEL_CROSSBAR_STALL_TCC7;
// static const uint32_t TccCounterBlockMaxEvent = TCC_PERF_SEL_CLIENT127_REQ;
// static const uint32_t TcpCounterBlockMaxEvent = TCP_PERF_SEL_TCC_DCC_REQ;
// static const uint32_t TdCounterBlockMaxEvent =
// TD_PERF_SEL_texels_zeroed_out_by_blend_zero_prt; static const uint32_t VgtCounterBlockMaxEvent =
// vgt_perf_sclk_te11_vld; static const uint32_t WdCounterBlockMaxEvent =
// wd_perf_utcl1_stall_utcl2_event;
static const uint32_t GceaCounterBlockMaxEvent = 76;
static const uint32_t AtcCounterBlockMaxEvent = 23;
static const uint32_t AtcL2CounterBlockMaxEvent = 7;
static const uint32_t RpbCounterBlockMaxEvent = 62;
static const uint32_t McVmL2CounterBlockMaxEvent = 20;
static const uint32_t RmiCounterBlockMaxEvent =
RMI_PERF_SEL_RMI_RB_EARLY_WRACK_CID3; // RMI_PERF_SEL_RMI_RB_EARLY_WRACK_NACK3;
static const uint32_t TcpCounterBlockMaxEvent = 61;
static const uint32_t Gl1aCounterBlockMaxEvent = 24;
static const uint32_t Gl1cCounterBlockMaxEvent = 84;
static const uint32_t Gl2aCounterBlockMaxEvent = 108;
static const uint32_t Gl2cCounterBlockMaxEvent = 259;
static const uint32_t GcrCounterBlockMaxEvent = 155;
static const uint32_t GusCounterBlockMaxEvent = 176;
} // namespace gfx11
} // namespace gfxip
#endif // _GFX11_BLOCKINFO_H_