---
# Add description/tips for each metric in this section.
# So it could be shown in hover.
Metric Description:

# Define the panel properties and properties of each metric in the panel.
Panel Config:
  id: 1000
  title: Compute Units - Instruction Mix
  data source:
    - metric_table:
        id: 1001
        title: Overall Instruction Mix
        header:
          metric: Metric
          avg: Avg
          min: Min
          max: Max
          unit: Unit
          tips: Tips
        metric:
          VALU:
            avg: AVG(((SQ_INSTS_VALU - SQ_INSTS_MFMA) / $denom))
            min: MIN(((SQ_INSTS_VALU - SQ_INSTS_MFMA) / $denom))
            max: MAX(((SQ_INSTS_VALU - SQ_INSTS_MFMA) / $denom))
            unit: (instr + $normUnit)
            tips:
          VMEM:
            avg: AVG(((SQ_INSTS_VMEM - SQ_INSTS_FLAT_LDS_ONLY) / $denom))
            min: MIN(((SQ_INSTS_VMEM - SQ_INSTS_FLAT_LDS_ONLY) / $denom))
            max: MAX(((SQ_INSTS_VMEM - SQ_INSTS_FLAT_LDS_ONLY) / $denom))
            unit: (instr + $normUnit)
            tips:
          LDS:
            avg: AVG((SQ_INSTS_LDS / $denom))
            min: MIN((SQ_INSTS_LDS / $denom))
            max: MAX((SQ_INSTS_LDS / $denom))
            unit: (instr + $normUnit)
            tips:
          MFMA:
            avg: AVG((SQ_INSTS_MFMA / $denom))
            min: MIN((SQ_INSTS_MFMA / $denom))
            max: MAX((SQ_INSTS_MFMA / $denom))
            unit: (instr + $normUnit)
            tips:
          SALU:
            avg: AVG((SQ_INSTS_SALU / $denom))
            min: MIN((SQ_INSTS_SALU / $denom))
            max: MAX((SQ_INSTS_SALU / $denom))
            unit: (instr + $normUnit)
            tips:
          SMEM:
            avg: AVG((SQ_INSTS_SMEM / $denom))
            min: MIN((SQ_INSTS_SMEM / $denom))
            max: MAX((SQ_INSTS_SMEM / $denom))
            unit: (instr + $normUnit)
            tips:
          Branch:
            avg: AVG((SQ_INSTS_BRANCH / $denom))
            min: MIN((SQ_INSTS_BRANCH / $denom))
            max: MAX((SQ_INSTS_BRANCH / $denom))
            unit: (instr + $normUnit)
            tips:

    - metric_table:
        id: 1002
        title: VALU Arithmetic Instr Mix
        header:
          metric: Metric
          avg: Avg
          min: Min
          max: Max
          unit: Unit
          tips: Tips
        metric:
          INT32:
            avg: AVG((SQ_INSTS_VALU_INT32 / $denom))
            min: MIN((SQ_INSTS_VALU_INT32 / $denom))
            max: MAX((SQ_INSTS_VALU_INT32 / $denom))
            unit: (instr + $normUnit)
            tips:
          INT64:
            avg: AVG((SQ_INSTS_VALU_INT64 / $denom))
            min: MIN((SQ_INSTS_VALU_INT64 / $denom))
            max: MAX((SQ_INSTS_VALU_INT64 / $denom))
            unit: (instr + $normUnit)
            tips:
          F16-ADD:
            avg: AVG((SQ_INSTS_VALU_ADD_F16 / $denom))
            min: MIN((SQ_INSTS_VALU_ADD_F16 / $denom))
            max: MAX((SQ_INSTS_VALU_ADD_F16 / $denom))
            unit: (instr + $normUnit)
            tips:
          F16-MUL:
            avg: AVG((SQ_INSTS_VALU_MUL_F16 / $denom))
            min: MIN((SQ_INSTS_VALU_MUL_F16 / $denom))
            max: MAX((SQ_INSTS_VALU_MUL_F16 / $denom))
            unit: (instr + $normUnit)
            tips:
          F16-FMA:
            avg: AVG((SQ_INSTS_VALU_FMA_F16 / $denom))
            min: MIN((SQ_INSTS_VALU_FMA_F16 / $denom))
            max: MAX((SQ_INSTS_VALU_FMA_F16 / $denom))
            unit: (instr + $normUnit)
            tips:
          F16-Trans:
            avg: AVG((SQ_INSTS_VALU_TRANS_F16 / $denom))
            min: MIN((SQ_INSTS_VALU_TRANS_F16 / $denom))
            max: MAX((SQ_INSTS_VALU_TRANS_F16 / $denom))
            unit: (instr + $normUnit)
            tips:
          F32-ADD:
            avg: AVG((SQ_INSTS_VALU_ADD_F32 / $denom))
            min: MIN((SQ_INSTS_VALU_ADD_F32 / $denom))
            max: MAX((SQ_INSTS_VALU_ADD_F32 / $denom))
            unit: (instr + $normUnit)
            tips:
          F32-MUL:
            avg: AVG((SQ_INSTS_VALU_MUL_F32 / $denom))
            min: MIN((SQ_INSTS_VALU_MUL_F32 / $denom))
            max: MAX((SQ_INSTS_VALU_MUL_F32 / $denom))
            unit: (instr + $normUnit)
            tips:
          F32-FMA:
            avg: AVG((SQ_INSTS_VALU_FMA_F32 / $denom))
            min: MIN((SQ_INSTS_VALU_FMA_F32 / $denom))
            max: MAX((SQ_INSTS_VALU_FMA_F32 / $denom))
            unit: (instr + $normUnit)
            tips:
          F32-Trans:
            avg: AVG((SQ_INSTS_VALU_TRANS_F32 / $denom))
            min: MIN((SQ_INSTS_VALU_TRANS_F32 / $denom))
            max: MAX((SQ_INSTS_VALU_TRANS_F32 / $denom))
            unit: (instr + $normUnit)
            tips:
          F64-ADD:
            avg: AVG((SQ_INSTS_VALU_ADD_F64 / $denom))
            min: MIN((SQ_INSTS_VALU_ADD_F64 / $denom))
            max: MAX((SQ_INSTS_VALU_ADD_F64 / $denom))
            unit: (instr + $normUnit)
            tips:
          F64-MUL:
            avg: AVG((SQ_INSTS_VALU_MUL_F64 / $denom))
            min: MIN((SQ_INSTS_VALU_MUL_F64 / $denom))
            max: MAX((SQ_INSTS_VALU_MUL_F64 / $denom))
            unit: (instr + $normUnit)
            tips:
          F64-FMA:
            avg: AVG((SQ_INSTS_VALU_FMA_F64 / $denom))
            min: MIN((SQ_INSTS_VALU_FMA_F64 / $denom))
            max: MAX((SQ_INSTS_VALU_FMA_F64 / $denom))
            unit: (instr + $normUnit)
            tips:
          F64-Trans:
            avg: AVG((SQ_INSTS_VALU_TRANS_F64 / $denom))
            min: MIN((SQ_INSTS_VALU_TRANS_F64 / $denom))
            max: MAX((SQ_INSTS_VALU_TRANS_F64 / $denom))
            unit: (instr + $normUnit)
            tips:
          Conversion:
            avg: AVG((SQ_INSTS_VALU_CVT / $denom))
            min: MIN((SQ_INSTS_VALU_CVT / $denom))
            max: MAX((SQ_INSTS_VALU_CVT / $denom))
            unit: (instr + $normUnit)
            tips:

    - metric_table:
        id: 1003
        title: VMEM Instr Mix
        header:
          metric: Metric
          avg: Avg
          min: Min
          max: Max
          unit: Unit
          tips: Tips
        metric:
          Global/Generic Instr:
            avg: AVG((TA_FLAT_WAVEFRONTS_sum / $denom))
            min: MIN((TA_FLAT_WAVEFRONTS_sum / $denom))
            max: MAX((TA_FLAT_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
         # TODO: Fix baseline comparision logic to handle non existent metrics, then remove this
          Spill/Stack Coalesceable Instr:
            avg: None
            min: None
            max: None
            unit: (instr + $normUnit)
            tips:
          Global/Generic Read:
            avg: AVG((TA_FLAT_READ_WAVEFRONTS_sum / $denom))
            min: MIN((TA_FLAT_READ_WAVEFRONTS_sum / $denom))
            max: MAX((TA_FLAT_READ_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Global/Generic Write:
            avg: AVG((TA_FLAT_WRITE_WAVEFRONTS_sum / $denom))
            min: MIN((TA_FLAT_WRITE_WAVEFRONTS_sum / $denom))
            max: MAX((TA_FLAT_WRITE_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Global/Generic Atomic:
            avg: AVG((TA_FLAT_ATOMIC_WAVEFRONTS_sum / $denom))
            min: MIN((TA_FLAT_ATOMIC_WAVEFRONTS_sum / $denom))
            max: MAX((TA_FLAT_ATOMIC_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Spill/Stack Instr:
            avg: AVG((TA_BUFFER_WAVEFRONTS_sum / $denom))
            min: MIN((TA_BUFFER_WAVEFRONTS_sum / $denom))
            max: MAX((TA_BUFFER_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Spill/Stack Read:
            avg: AVG((TA_BUFFER_READ_WAVEFRONTS_sum / $denom))
            min: MIN((TA_BUFFER_READ_WAVEFRONTS_sum / $denom))
            max: MAX((TA_BUFFER_READ_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Spill/Stack Write:
            avg: AVG((TA_BUFFER_WRITE_WAVEFRONTS_sum / $denom))
            min: MIN((TA_BUFFER_WRITE_WAVEFRONTS_sum / $denom))
            max: MAX((TA_BUFFER_WRITE_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:
          Spill/Stack Atomic:
            avg: AVG((TA_BUFFER_ATOMIC_WAVEFRONTS_sum / $denom))
            min: MIN((TA_BUFFER_ATOMIC_WAVEFRONTS_sum / $denom))
            max: MAX((TA_BUFFER_ATOMIC_WAVEFRONTS_sum / $denom))
            unit: (instr + $normUnit)
            tips:

    - metric_table:
        id: 1004
        title: MFMA Arithmetic Instr Mix
        header:
          metric: Metric
          avg: Avg
          min: Min
          max: Max
          unit: Unit
          tips: Tips
        metric:
          MFMA-I8:
            avg: AVG((SQ_INSTS_VALU_MFMA_I8 / $denom))
            min: MIN((SQ_INSTS_VALU_MFMA_I8 / $denom))
            max: MAX((SQ_INSTS_VALU_MFMA_I8 / $denom))
            unit: (instr + $normUnit)
            tips:
          MFMA-F8:
            avg: None
            min: None
            max: None
            unit: (instr + $normUnit)
            tips:
          MFMA-F16:
            avg: AVG((SQ_INSTS_VALU_MFMA_F16 / $denom))
            min: MIN((SQ_INSTS_VALU_MFMA_F16 / $denom))
            max: MAX((SQ_INSTS_VALU_MFMA_F16 / $denom))
            unit: (instr + $normUnit)
            tips:
          MFMA-BF16:
            avg: AVG((SQ_INSTS_VALU_MFMA_BF16 / $denom))
            min: MIN((SQ_INSTS_VALU_MFMA_BF16 / $denom))
            max: MAX((SQ_INSTS_VALU_MFMA_BF16 / $denom))
            unit: (instr + $normUnit)
            tips:
          MFMA-F32:
            avg: AVG((SQ_INSTS_VALU_MFMA_F32 / $denom))
            min: MIN((SQ_INSTS_VALU_MFMA_F32 / $denom))
            max: MAX((SQ_INSTS_VALU_MFMA_F32 / $denom))
            unit: (instr + $normUnit)
            tips:
          MFMA-F64:
            avg: AVG((SQ_INSTS_VALU_MFMA_F64 / $denom))
            min: MIN((SQ_INSTS_VALU_MFMA_F64 / $denom))
            max: MAX((SQ_INSTS_VALU_MFMA_F64 / $denom))
            unit: (instr + $normUnit)
            tips:
          # TODO: Fix baseline comparision logic to handle non existent metrics, then 
          MFMA-F6F4:
            avg: None
            min: None
            max: None
            unit: (instr + $normUnit)
            tips:
