problem: "AICPU Issues"
description: "Some operators and task duration exceed {} us, such as :\n"
suggestion: "Modify code to avoid aicpu operator"
double_suggestion: "Try to convert double type operator to float, such as {}"
DataTypeSuggeation: &DataTypeSuggeation "Data type {} in {} operator may cause AICPU issues, Try to convert to {} if possible."
AICPU_DOC_URL: &AICPU_DOC_URL "https://gitcode.com/Ascend/msprof-analyze/blob/master/docs/zh/aicpu_operator_replacement_example.md"

CommonChecker:
  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ __ALL__ ]
      ignore_type: [ cast, tensorequal, equal, nonzero, mul ]
      input: [ float, float32, float16, bool, int32, uint32, int64, uint64, int8, uint8, int16, uint16, dt_bf16 ]
      output: [ float, float32, float16, bool, int32, uint32, int64, uint64, int8, uint8, int16, uint16, dt_bf16 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ cast ]
      input: [ float, float32, float16, bool, int32, uint32, int64, uint64, uint8, dt_bf16 ]
      output: [ float, float32, float16, bool, int32, uint32, int64, uint64, uint8, dt_bf16 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ tensorequal ]
      input: [ float, float32, float16, bool, int32, int8, uint8 ]
      output: [ bool ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ equal ]
      input: [ float, float32, float16, bool, int32, int64, int8, uint8 ]
      output: [ bool ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ nonzero ]
      input: [ float16, bool, dt_bf16 ]
      output: [ int64 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [7.0.RC1]
      op_type: [ mul ]
      input: [ float, float32, float16, bool, int32, uint32, int64, uint64, int8, uint8, dt_bf16 ]
      output: [ float, float32, float16, bool, int32, uint32, int64, uint64, int8, uint8, dt_bf16 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [8.0.RC1, 7.0.0]
      op_type: [ __ALL__ ]
      ignore_type: [ cast, tensorequal, equal, nonzero, mul ]
      input: [ float, float32, float16, dt_bf16, float64, bool, int32, int64, int8, uint8, int16, complex64, complex128 ]
      output: [ float, float32, float16, dt_bf16, float64, bool, int32, int64, int8, uint8, int16, complex64, complex128 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [8.0.RC1, 7.0.0]
      op_type: [ cast ]
      input: [ float, float32, float16, bool, int32, uint32, int64, uint64, uint8, dt_bf16 ]
      output: [ float, float32, float16, bool, int32, uint32, int64, uint64, uint8, dt_bf16 ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [8.0.RC1, 7.0.0]
      op_type: [ tensorequal ]
      input: [ float, float32, float16, dt_bf16, float64, bool, int32, int8, uint8 ]
      output: [ bool ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [8.0.RC1, 7.0.0]
      op_type: [ equal ]
      input: [ float, float32, float16, dt_bf16, float64, bool, int32, int64, int8, uint8 ]
      output: [ bool ]
      suggestion: *DataTypeSuggeation

  - DataTypeChecker:
      cann_version: [8.0.RC1, 7.0.0]
      op_type: [ mul ]
      input: [ float, float32, float16, dt_bf16, float64, bool, int32, int64, int8, uint8, complex64 ]
      output: [ float, float32, float16, dt_bf16, float64, bool, int32, int64, int8, uint8, complex64 ]
      suggestion: *DataTypeSuggeation

ExampleGuideChecker:
  - IndexPutChecker:
      op_type: [index]
      url: *AICPU_DOC_URL
      suggestion: 'Please modify source code followed by this <a href="{}" target="_blank">LINK</a>, try to replace index operator with equivalent operator.'

  - NonzeroChecker:
      op_type: [ indexput, indexputv2 ]
      url: *AICPU_DOC_URL
      suggestion: 'Please modify source code followed by this <a href="{}" target="_blank">LINK</a>, try to replace indexput operator with equivalent operator.'

  - CastChecker:
      op_type: [ argmin ]
      url: *AICPU_DOC_URL
      suggestion: 'Please update your cann-tookit to at least 7.0.RC1 version by this <a href="{}" target="_blank">LINK</a>.'

  - CastChecker:
      op_type: [ nonzero ]
      url: *AICPU_DOC_URL
      suggestion: 'Please modify source code followed by this <a href="{}" target="_blank">LINK</a>, try to replace nonzero operator with equivalent operator.'