P4 to Git Change 1358001 by skudchad@skudchad_test_win_opencl2 on 2017/01/03 15:05:28
SWDEV-107271 - [OpenCL][GFXIP9 Bring up] add support for Raven(gfx901) - Add perf counter blocks in PAL backend. ReviewBoardURL = http://ocltc.amd.com/reviews/r/12108/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcounters.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#36 edit
This commit is contained in:
@@ -228,7 +228,7 @@ std::array<std::pair<int, int>, 83> ciBlockIdOrcaToPal =
|
||||
}};
|
||||
|
||||
static const
|
||||
std::array<std::pair<int, int>, 98> viBlockIdOrcaToPal =
|
||||
std::array<std::pair<int, int>, 97> viBlockIdOrcaToPal =
|
||||
{{
|
||||
{0x0F, 0}, // CB0
|
||||
{0x0F, 1}, // CB1
|
||||
@@ -329,6 +329,117 @@ std::array<std::pair<int, int>, 98> viBlockIdOrcaToPal =
|
||||
{0x18, 0}, // CPC
|
||||
}};
|
||||
|
||||
// The number of counters per block has been increased for gfx9 but this table may not reflect all of them
|
||||
// as compute may not use all of them.
|
||||
static const
|
||||
std::array<std::pair<int, int>, 104> gfx9BlockIdPal =
|
||||
{{
|
||||
{ 0x0F, 0 }, // CB0
|
||||
{ 0x0F, 1 }, // CB1
|
||||
{ 0x0F, 2 }, // CB2
|
||||
{ 0x0F, 3 }, // CB3
|
||||
{ 0x01, 0 }, // CPF0
|
||||
{ 0x01, 1 }, // CPF1
|
||||
{ 0x0E, 0 }, // DB0
|
||||
{ 0x0E, 1 }, // DB1
|
||||
{ 0x0E, 2 }, // DB2
|
||||
{ 0x0E, 3 }, // DB3
|
||||
{ 0x12, 0 }, // GRBM0
|
||||
{ 0x12, 1 }, // GRBM1
|
||||
{ 0x13, 0 }, // GRBMSE0
|
||||
{ 0x04, 0 }, // PA_SU
|
||||
{ 0x04, 0 }, // PA_SC
|
||||
{ 0x06, 0 }, // SPI
|
||||
{ 0x07, 0 }, // SQ0
|
||||
{ 0x07, 1 }, // SQ1
|
||||
{ 0x07, 0 }, // SQ_ES
|
||||
{ 0x07, 0 }, // SQ_GS
|
||||
{ 0x07, 0 }, // SQ_VS
|
||||
{ 0x07, 0 }, // SQ_PS
|
||||
{ 0x07, 0 }, // SQ_LS
|
||||
{ 0x07, 0 }, // SQ_HS
|
||||
{ 0x07, 0 }, // SQ_CS0
|
||||
{ 0x07, 1 }, // SQ_CS1
|
||||
{ 0x08, 0 }, // SX
|
||||
{ 0x09, 0 }, // TA0
|
||||
{ 0x09, 1 }, // TA1
|
||||
{ 0x09, 2 }, // TA2
|
||||
{ 0x09, 3 }, // TA3
|
||||
{ 0x09, 4 }, // TA4
|
||||
{ 0x09, 5 }, // TA5
|
||||
{ 0x09, 6 }, // TA6
|
||||
{ 0x09, 7 }, // TA7
|
||||
{ 0x09, 8 }, // TA8
|
||||
{ 0x09, 9 }, // TA9
|
||||
{ 0x09, 0x0a }, // TA10
|
||||
{ 0x09, 0x0b }, // TA11
|
||||
{ 0x09, 0x0c }, // TA12
|
||||
{ 0x09, 0x0d }, // TA13
|
||||
{ 0x09, 0x0e }, // TA14
|
||||
{ 0x09, 0x0f }, // TA15
|
||||
{ 0x0D, 0 }, // TCA0
|
||||
{ 0x0D, 1 }, // TCA1
|
||||
{ 0x0C, 0 }, // TCC0
|
||||
{ 0x0C, 1 }, // TCC1
|
||||
{ 0x0C, 2 }, // TCC2
|
||||
{ 0x0C, 3 }, // TCC3
|
||||
{ 0x0C, 4 }, // TCC4
|
||||
{ 0x0C, 5 }, // TCC5
|
||||
{ 0x0C, 6 }, // TCC6
|
||||
{ 0x0C, 7 }, // TCC7
|
||||
{ 0x0C, 8 }, // TCC8
|
||||
{ 0x0C, 9 }, // TCC9
|
||||
{ 0x0C, 0x0a }, // TCC10
|
||||
{ 0x0C, 0x0b }, // TCC11
|
||||
{ 0x0C, 0x0c }, // TCC12
|
||||
{ 0x0C, 0x0d }, // TCC13
|
||||
{ 0x0C, 0x0e }, // TCC14
|
||||
{ 0x0C, 0x0f }, // TCC15
|
||||
{ 0x0A, 0 }, // TD0
|
||||
{ 0x0A, 1 }, // TD1
|
||||
{ 0x0A, 2 }, // TD2
|
||||
{ 0x0A, 3 }, // TD3
|
||||
{ 0x0A, 4 }, // TD4
|
||||
{ 0x0A, 5 }, // TD5
|
||||
{ 0x0A, 6 }, // TD6
|
||||
{ 0x0A, 7 }, // TD7
|
||||
{ 0x0A, 8 }, // TD8
|
||||
{ 0x0A, 9 }, // TD9
|
||||
{ 0x0A, 0x0a }, // TD10
|
||||
{ 0x0A, 0x0b }, // TD11
|
||||
{ 0x0A, 0x0c }, // TD12
|
||||
{ 0x0A, 0x0d }, // TD13
|
||||
{ 0x0A, 0x0e }, // TD14
|
||||
{ 0x0A, 0x0f }, // TD15
|
||||
{ 0x0B, 0 }, // TCP0
|
||||
{ 0x0B, 1 }, // TCP1
|
||||
{ 0x0B, 2 }, // TCP2
|
||||
{ 0x0B, 3 }, // TCP3
|
||||
{ 0x0B, 4 }, // TCP4
|
||||
{ 0x0B, 5 }, // TCP5
|
||||
{ 0x0B, 6 }, // TCP6
|
||||
{ 0x0B, 7 }, // TCP7
|
||||
{ 0x0B, 8 }, // TCP8
|
||||
{ 0x0B, 9 }, // TCP9
|
||||
{ 0x0B, 0x0a }, // TCP10
|
||||
{ 0x0B, 0x0b }, // TCP11
|
||||
{ 0x0B, 0x0c }, // TCP12
|
||||
{ 0x0B, 0x0d }, // TCP13
|
||||
{ 0x0B, 0x0e }, // TCP14
|
||||
{ 0x0B, 0x0f }, // TCP15
|
||||
{ 0x10, 0 }, // GDS0
|
||||
{ 0x10, 1 }, // GDS1
|
||||
{ 0x03, 0 }, // VGT
|
||||
{ 0x02, 0 }, // IA
|
||||
{ 0x16, 0 }, // MC
|
||||
{ 0x11, 0 }, // SRBM
|
||||
{ 0x19, 0 }, // WD
|
||||
{ 0x17, 0 }, // CPG0
|
||||
{ 0x17, 1 }, // CPG1
|
||||
{ 0x18, 0 }, // CPC0
|
||||
{ 0x18, 1 }, // CPC1
|
||||
}};
|
||||
|
||||
void PerfCounter::convertInfo()
|
||||
{
|
||||
switch (dev().ipLevel()) {
|
||||
@@ -347,7 +458,11 @@ void PerfCounter::convertInfo()
|
||||
}
|
||||
break;
|
||||
case Pal::GfxIpLevel::GfxIp9:
|
||||
Unimplemented();
|
||||
if (info_.blockIndex_ < gfx9BlockIdPal.size()) {
|
||||
auto p = gfx9BlockIdPal[info_.blockIndex_];
|
||||
info_.blockIndex_ = std::get<0>(p);
|
||||
info_.counterIndex_ = std::get<1>(p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Unimplemented();
|
||||
|
||||
Reference in New Issue
Block a user