# NOTE: Metrics representing a superset of other metrics must be declared first
# if they appear in the same group (displayRows). Otherwise different metrics will
# dominate in the group row depending on zoom level if overlay display mode is used.
version: 3
metricSets:
- alias: tu11x
  name: General Metrics for NVIDIA TU11x (any frequency)
  chips: [TU116, TU117]
  counterWidth: wide
  displayRows:
  - name: $root:Activity
    type: overlay
    displayHeightScale: 0.5
    metrics:
    - GR Active
  - name: $root:Memory
    type: overlay
    displayHeightScale: -0.5
    metrics:
    - PCIe RX Throughput
    - PCIe TX Throughput
  - name: GPC Clock Frequency
    type: overlay
    metrics:
    - GPC Clock Frequency
  - name: SYS Clock Frequency
    type: overlay
    metrics:
    - SYS Clock Frequency
  - name: GPU Active
    description: The graphics or copy engine is active
    type: overlay
    metrics:
    - GR Active
  - name: Compute in Flight
    description: Compute dispatches sent to the GPU queues that have been issued,
      but not yet complete
    type: overlay
    metrics:
    - Sync Compute in Flight
    - Async Compute in Flight
  - name: Draw/Dispatch Start
    description: Draw and dispatch start times
    type: overlay
    metrics:
    - Draw Started
    - Dispatch Started
  - name: SMs Active
    type: overlay
    metrics:
    - SMs Active
  - name: SM Instructions
    type: overlay
    metrics:
    - SM Issue
  - name: SM Warp Occupancy
    type: stacked
    displayHeightScale: 3.0
    metrics:
    - Vertex/Tess/Geometry Warps in Flight
    - Pixel Warps in Flight
    - Compute Warps in Flight
    - Unallocated Warps in Active SMs
  - name: DRAM Bandwidth
    type: stacked
    metrics:
    - DRAM Read Bandwidth
    - DRAM Write Bandwidth
  - name: PCIe Bandwidth
    type: overlay
    metrics:
    - PCIe RX Throughput
    - PCIe TX Throughput
  - name: PCIe Read Requests to BAR1
    metrics:
    - PCIe Read Requests to BAR1
  - name: PCIe Write Requests to BAR1
    metrics:
    - PCIe Write Requests to BAR1
  metrics:
  - name: GPC Clock Frequency
    id: gpc__cycles_elapsed
    description: The frequency of the GPC graphics clock. In NVIDIA GPU Specs this
      is the Boost Clock and Base Clock. In nvidia-smi this is the "gr", "graphics",
      "Graphics Clock".
    color: '#8BDDB4'
    subMetrics:
    - name: MHz
      label: $freq
      suffix: .avg.per_second
      multiplier: 1.0e-06
  - name: SYS Clock Frequency
    id: sys__cycles_elapsed
    description: The frequency of the SYS clock. The SYS clock is the clock used for
      the copy engines, compute and graphics command processor, and the hardware performance
      monitor streaming unit.
    color: '#118E44'
    schedulingRule: migOptional
    subMetrics:
    - name: MHz
      label: $freq
      suffix: .avg.per_second
      multiplier: 1.0e-06
  - name: GR Active
    id: gr__cycles_active
    description: Number of cycles the graphics/compute engine is active. The graphics
      and compute engine are active if there is any work in the graphics pipe or if
      the compute pipe is processing a dispatch.
    color: '#ED6A32'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: Sync Compute in Flight
    id: HUB.TriageA.gr__dispatch_cycles_active_queue_sync
    color: '#FE7F9C'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: Async Compute in Flight
    id: HUB.TriageA.gr__dispatch_cycles_active_queue_async
    color: '#FFD179'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: Draw Started
    id: FE_A.TriageA.fe__draw_count
    description: Number of draw calls started
    color: '#F0F000'
    subMetrics:
    - name: Workloads
      suffix: .sum
  - name: Dispatch Started
    id: HUB.TriageA.gr__dispatch_count
    description: Number of compute dispatches/grid launches started
    color: '#00F0F0'
    subMetrics:
    - name: Workloads
      suffix: .sum
  - name: SMs Active
    id: sm__cycles_active
    description: The ratio of cycles SMs had at least 1 warp in flight to the number
      of cycles
    color: '#FFA5A5'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: SM Issue
    id: SM.TriageA.sm__inst_executed_realtime
    description: SM instruction issue rate. Each SM can issue 4 instructions/cycle
      (1 instruction/SMSP/cycle).
    color: '#98C4DD'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: Vertex/Tess/Geometry Warps in Flight
    id: TPC.TriageA.tpc__warps_active_shader_vtg_realtime
    description: Total number of graphics vertex, tesselation, geometry, and mesh
      shader warps in flight
    color: '#FFA5A5'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
    - name: Avg
      suffix: .avg
    - name: Avg Warps per Cycle
      suffix: .avg.per_cycle_elapsed
  - name: Pixel Warps in Flight
    id: TPC.TriageA.tpc__warps_active_shader_ps_realtime
    description: Total number of pixel shader warps in flight
    color: '#8BDDB4'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
    - name: Avg
      suffix: .avg
    - name: Avg Warps per Cycle
      suffix: .avg.per_cycle_elapsed
  - name: Compute Warps in Flight
    id: TPC.TriageA.tpc__warps_active_shader_cs_realtime
    description: Total number of compute shader warps in flight
    color: '#FFD179'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
    - name: Avg
      suffix: .avg
    - name: Avg Warps per Cycle
      suffix: .avg.per_cycle_elapsed
  - name: Unallocated Warps in Active SMs
    id: TPC.TriageA.tpc__warps_inactive_sm_active_realtime
    description: Total number of warp slots available on active SMs
    color: '#696969'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
    - name: Avg
      suffix: .avg
    - name: Avg Warps per Cycle
      suffix: .avg.per_cycle_elapsed
  - name: DRAM Read Bandwidth
    id: dramc__read_throughput
    description: The ratio of cycles the DRAM interface was active reading data to
      the elapsed cycles in the same period as a percentage
    color: '#FFA5A5'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: DRAM Write Bandwidth
    id: dramc__write_throughput
    description: The ratio of cycles the DRAM interface was active writing data to
      the elapsed cycles in the same period as a percentage
    color: '#98C4DD'
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: PCIe RX Throughput
    id: PCI.TriageA.pcie__read_bytes
    description: Number of bytes received by GPU (includes protocol)
    color: '#FF3D00'
    schedulingRule: migOptional
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: PCIe TX Throughput
    id: PCI.TriageA.pcie__write_bytes
    description: Number of bytes transmitted by GPU (includes protocol)
    color: '#00CFCF'
    schedulingRule: migOptional
    subMetrics:
    - name: Throughput %
      label: $pct
      suffix: .avg.pct_of_peak_sustained_elapsed
  - name: PCIe Read Requests to BAR1
    id: pcie__rx_requests_aperture_bar1_op_read
    description: CPU+Peer Reads from VRAM over PCIe
    color: '#87FFFF'
    subMetrics:
    - name: Requests
      suffix: .sum
  - name: PCIe Write Requests to BAR1
    id: pcie__rx_requests_aperture_bar1_op_write
    description: CPU+Peer Writes to VRAM over PCIe
    color: '#8700FF'
    subMetrics:
    - name: Requests
      suffix: .sum
