Cambricon / mlu-ops

Efficient operation implementation based on the Cambricon Machine Learning Unit (MLU) .
MIT License
103 stars 102 forks source link

Nl21427 #1116

Open nth-BYTE opened 2 weeks ago

nth-BYTE commented 2 weeks ago

Thanks for your contribution and we appreciate it a lot. :rocket::rocket:

1. Motivation

Please describe your motivation and the goal you want to achieve through this pull request.

2. Modification

Please briefly describe what modification is made in this pull request, and indicate where to make the modification.

Are new test cases added? If so, please post the corresponding generator-PR link here.

3. Test Report

If you want to know how to do operator testing, you can see GTest-User-Guide-zh.

3.1 Modification Details

3.1.1 Accuracy Acceptance Standard

For static threshold standard details, see: MLU-OPS™ Accuracy Acceptance Standard.

3.1.2 Operator Scheme checklist

3.2 Accuracy Test

3.2.1 Accuracy Test

If you have checked the following items, please tick the relevant box.

3.2.2 Parameter Check

Test Point-1: When a new operator is submitted, the test points are given and the test results are stated. Acceptance Standard: Normal error.

Please fill your test results(Error Message) in here, ...

Test Point-2: Whether illegal parameters are passed. Acceptance Standard: Normal error.

Test results...

3.3 Performance Test

See MLU-OPS™ Performance Acceptance Standard for details.

Platform:MLU370

# The test results should contain Op name, Shape, Data type,  
#   MLU Hardware Time(us), MLU Interface Time(us), MLU IO Efficiency, 
#   MLU Compute Efficiency, and Mlu Workspace Size(Bytes)
# 
# for example:
#
# ----------- case0 -----------
# case0
# [Op name                ]: abs
# [Shape                  ]: input.shape=[1024,1024,3,4], output.shape=[1024,1024,3,4]
# [Data type]             ]: float32
# [MLU Hardware Time      ]: 15728 (us)
# [MLU Interface Time     ]: 369.008 (us)
# [MLU IO Efficiency      ]: 0.23275
# [MLU Compute Efficiency ]: 0.5
# [Mlu Workspace Size     ]: -1 (Bytes)
# 
# ----------- case1 -----------
# ...

Platform:MLU590

[----------] 1 test from yolo_box/TestSuite
[ RUN      ] yolo_box/TestSuite.mluOp/0
[MLU Hardware Time      ]: 57 (us)
[MLU Interface Time     ]: 70.981 (us)
[MLU IO Efficiency      ]: 0.00171107
[MLU Compute Efficiency ]: 0.00614035
[MLU Workspace Size     ]: -1 (Bytes)
[MLU Kernel Name(s)     ]: {}
[MLU TheoryOps          ]: 806400 (Ops)
[MLU TheoryIOs          ]: 199744 (Bytes)
[MLU ComputeForce       ]: 2.304e+12 (op/s)
[MLU IoBandWidth        ]: 2048 (GB/s)
[GPU Hardware Time      ]: -1 (us)
[GPU IO Efficiency      ]: -1
[GPU Compute Efficiency ]: -1
[GPU Workspace Size     ]: -1 (Bytes)
[Diffs]:
[output1]
DIFF1: 6.567290e-09
DIFF2: 2.416225e-08
[output2]
DIFF1: 4.524716e-08
DIFF2: 6.251300e-08
[^      OK ] ../../test/mlu_op_gtest/pb_gtest/src/zoo/yolo_box/test_case/case_0.prototxt
[       OK ] yolo_box/TestSuite.mluOp/0 (2 ms)
[----------] 1 test from yolo_box/TestSuite (2 ms total)

[----------] Global test environment tear-down
[ SUMMARY  ] Total 112 cases of 72 op(s).
ALL PASSED.
[==========] 114 test cases from 74 test suites ran. (48078 ms total)
[  PASSED  ] 114 test cases.

3.4 Summary Analysis

Please give a brief overview here, if you want to note and summarize the content.