Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature](bangc-ops): Add new binary op mluOpDCNBackwardData. #903

Merged
merged 11 commits into from
Dec 29, 2023

Conversation

mahxn0
Copy link
Collaborator

@mahxn0 mahxn0 commented Dec 25, 2023

Thanks for your contribution and we appreciate it a lot. 🚀🚀

1. Motivation

Add new binary-op mluOpDCNBackwardData.

2. Modification

bangc-ops/kernels/dcn_backward_data/dcn_backward_data.cpp
bangc-ops/mlu_op.h
bangc-ops/test/mlu_op_gtest/pb_gtest/src/pb_test_tools.cpp
bangc-ops/test/mlu_op_gtest/pb_gtest/src/zoo/dcn_backward_data/dcn_backward_data.cpp
bangc-ops/test/mlu_op_gtest/pb_gtest/src/zoo/dcn_backward_data/dcn_backward_data.h
docs/bangc-docs/BANGC-OPS-OpList.md

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.

  • static threshold
    • diff1
      • float32 mlu diff1 <= 1e-5
      • float32 mlu diff1 <= 3e-3
      • float16 mlu diff1 <= 3e-3
    • diff2
      • float32 mlu diff2 <= 1e-5
      • float32 mlu diff2 <= 3e-3
      • float16 mlu diff2 <= 3e-3
    • diff3
      • mlu diff3 == 0
      • mlu diff3_1 == 0
      • mlu diff3_2 == 0
  • dynamic threshold
    • diff1: mlu diff1 <= max(baseline diff1 * 10, static threshold)
    • diff2: mlu diff2 <= max(baseline diff2 * 10, static threshold)
    • diff3: mlu diff3 <= max(baseline diff3 * 10, static threshold)
      • float32, threshold = 1e-5
      • float16, threshold = 1e-3

3.1.2 Operator Scheme checklist

  • Supported hardware
    • MLU370
    • MLU590
  • Job types
    • BLOCK
    • UNION1
    • UNION2
    • UNION4
    • The operator will dynamically select the most suitable task type, for example, UNION8

3.2 Accuracy Test

3.2.1 Accuracy Test

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

  • Data type test (e.g. float32/int8)
  • Multi-dimensional tensor test
  • Layout test
  • Different size/integer remainder end segment/alignment misalignment test
  • Zero dimensional tensor test/zero element test
  • stability test
  • Multiple platform test
  • Gen_case module test, see: Gencase-User-Guide-zh
  • Nan/INF tests
  • Bug fix tests
  • For memory leak check details, see: GTest-User-Guide-zh
  • For code coverage check details, see: GTest-User-Guide-zh
  • For I/O calculation efficiency check details, see: MLU-OPS-Performance-Acceptance-Standard

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

[MLU Hardware Time      ]: 353 (us)
[MLU Interface Time     ]: 403.358 (us)
[MLU IO Efficiency      ]: 0.0598806
[MLU Compute Efficiency ]: 0.00218556
[MLU Workspace Size     ]: -1 (Bytes)
[MLU TheoryOps          ]: 790020 (Ops)
[MLU TheoryIOs          ]: 6.49355e+06 (Bytes)
[MLU ComputeForce       ]: 1.024e+12 (op/s)
[MLU IoBandWidth        ]: 307.2 (GB/s)
[GPU Hardware Time      ]: 8.0384e-05 (us)
[GPU IO Efficiency      ]: 0.235106
[GPU Compute Efficiency ]: 0.00121334
[GPU Workspace Size     ]: 0 (Bytes)
[Diffs]:
[output1]
DIFF1: 5.732006e-08
DIFF2: 7.739434e-08
[output2]
DIFF1: 1.952590e-07
DIFF2: 2.119860e-07
[output3]
DIFF1: 1.972027e-07
DIFF2: 2.122958e-07
[^      OK ] /data/mlu-ops/backup/release_temp/dcn_backward_data/dcn_backward_data_8_manual_float32_float32_1655989916393.pb
[       OK ] dcn_backward_data/TestSuite.mluOp/99 (398 ms)
[----------] 100 tests from dcn_backward_data/TestSuite (72132 ms total)

[----------] Global test environment tear-down
[ SUMMARY  ] Total 100 cases of 1 op(s).
ALL PASSED.
[==========] 100 test cases from 1 test suite ran. (76218 ms total)
[  PASSED  ] 100 test cases.

Platform:MLU590

[MLU Hardware Time      ]: 63 (us)
[MLU Interface Time     ]: 134.173 (us)
[MLU IO Efficiency      ]: 0.0503282
[MLU Compute Efficiency ]: 0.00544271
[MLU Workspace Size     ]: -1 (Bytes)
[MLU TheoryOps          ]: 790020 (Ops)
[MLU TheoryIOs          ]: 6.49355e+06 (Bytes)
[MLU ComputeForce       ]: 2.304e+12 (op/s)
[MLU IoBandWidth        ]: 2048 (GB/s)
[GPU Hardware Time      ]: 8.0384e-05 (us)
[GPU IO Efficiency      ]: 0.235106
[GPU Compute Efficiency ]: 0.00121334
[GPU Workspace Size     ]: 0 (Bytes)
[Diffs]:
[output1]
DIFF1: 7.173844e-08
DIFF2: 9.022284e-08
[output2]
DIFF1: 1.952590e-07
DIFF2: 2.119860e-07
[output3]
DIFF1: 1.972027e-07
DIFF2: 2.122958e-07
[^      OK ] /data/mlu-ops/backup/release_temp/dcn_backward_data/dcn_backward_data_8_manual_float32_float32_1655989916393.pb
[       OK ] dcn_backward_data/TestSuite.mluOp/99 (39 ms)
[----------] 100 tests from dcn_backward_data/TestSuite (24846 ms total)

[----------] Global test environment tear-down
[ SUMMARY  ] Total 100 cases of 1 op(s).
ALL PASSED.
[==========] 100 test cases from 1 test suite ran. (28360 ms total)
[  PASSED  ] 100 test cases.

3.4 Summary Analysis

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

@mahxn0 mahxn0 changed the title Binary op dcnbpdata [Feature](bangc-ops): Add new binary op mluOpDCNBackwardData. Dec 26, 2023
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
@PetrelYy PetrelYy added the BANGC label Dec 29, 2023
@PetrelYy PetrelYy added this to the v1.0.0 milestone Dec 29, 2023
@PetrelYy PetrelYy merged commit 3c0b5fe into Cambricon:master Dec 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants