Skip to content

Commit

Permalink
Add support for gfx90a
Browse files Browse the repository at this point in the history
Merge gfx90a support from the 'amd-npi' branch.

Change-Id: I9b51711ed4a1d2f1ed42ba9b83cb12136be228b8
  • Loading branch information
AMD authored and lmoriche committed Jun 16, 2021
1 parent afad08b commit 4df3e0b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/core/metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ class MetricsDict {
xml_->AddConst("top.const.metric", "SE_NUM", agent_info->se_num);
ImportMetrics(agent_info, "const");
agent_name_ = agent_info->name;
if (std::string("gfx906") == agent_info->name) {
ImportMetrics(agent_info, agent_info->name);
} else if (std::string("gfx908") == agent_info->name) {
if (std::string("gfx906") == agent_info->name ||
std::string("gfx908") == agent_info->name ||
std::string("gfx90a") == agent_info->name) {
ImportMetrics(agent_info, agent_info->name);
} else {
agent_name_ = agent_info->gfxip;
Expand Down
17 changes: 17 additions & 0 deletions test/tool/gfx_metrics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,20 @@
<metric name="TCC_EA_RDREQ" block=TCC event=38 descr="Number of TCC/EA read requests (either 32-byte or 64-byte)"></metric>
<metric name="TCC_EA_RDREQ_32B" block=TCC event=39 descr="Number of 32-byte TCC/EA read requests"></metric>
</gfx908>

<gfx90a base="gfx908">
<metric name="SQ_INSTS_VMEM_WR" block=SQ event=53 descr="Number of VMEM write instructions issued (including FLAT). (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_VMEM_RD" block=SQ event=54 descr="Number of VMEM read instructions issued (including FLAT). (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_SALU" block=SQ event=56 descr="Number of SALU instructions issued. (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_SMEM" block=SQ event=57 descr="Number of SMEM instructions issued. (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_FLAT" block=SQ event=58 descr="Number of FLAT instructions issued. (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_FLAT_LDS_ONLY" block=SQ event=59 descr="Number of FLAT instructions issued that read/wrote only from/to LDS (only works if EARLY_TA_DONE is enabled). (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_LDS" block=SQ event=60 descr="Number of LDS instructions issued (including FLAT). (per-simd, emulated)"></metric>
<metric name="SQ_INSTS_GDS" block=SQ event=61 descr="Number of GDS instructions issued. (per-simd, emulated)"></metric>

<metric name="SQ_WAIT_INST_LDS" block=SQ event=91 descr="Number of wave-cycles spent waiting for LDS instruction issue. In units of 4 cycles. (per-simd, nondeterministic)"></metric>
<metric name="SQ_ACTIVE_INST_VALU" block=SQ event=99 descr="regspec 71? Number of cycles the SQ instruction arbiter is working on a VALU instruction. (per-simd, nondeterministic)"></metric>
<metric name="SQ_INST_CYCLES_SALU" block=SQ event=112 descr="Number of cycles needed to execute non-memory read scalar operations. (per-simd, emulated)"></metric>
<metric name="SQ_THREAD_CYCLES_VALU" block=SQ event=113 descr="Number of thread-cycles used to execute VALU operations (similar to INST_CYCLES_VALU but multiplied by # of active threads). (per-simd)"></metric>
<metric name="SQ_LDS_BANK_CONFLICT" block=SQ event=121 descr="Number of cycles LDS is stalled by bank conflicts. (emulated)"></metric>
</gfx90a>
8 changes: 6 additions & 2 deletions test/tool/metrics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@
<metric name="TCC_WRREQ_STALL_max" expr=max(TCC_EA_WRREQ_STALL,32) descr="Number of cycles a write request was stalled. Max over TCC instances."></metric>
</gfx908_expr>

<gfx90a_expr base="gfx908_expr"></gfx90a_expr>

<gfx8 base="gfx8_expr"></gfx8>
<gfx9 base="gfx9_expr"></gfx9>
# VG20
# Vega20
<gfx906 base="gfx906_expr"></gfx906>
# MI100
# Arcturus
<gfx908 base="gfx908_expr"></gfx908>
# Aldebaran
<gfx90a base="gfx90a_expr"></gfx90a>

<global>
# GPUBusy The percentage of time GPU was busy.
Expand Down

0 comments on commit 4df3e0b

Please sign in to comment.