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 Sybn op. #844

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Conversation

yuer-cn
Copy link
Collaborator

@yuer-cn yuer-cn commented Sep 22, 2023

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

1. Motivation

将sybn6个小算子以二进制形式合入mluops。

2. Modification

增加算子sync_batch_norm_backward_elemt,sync_batchnorm_backward_elemt_v2,sync_batchnorm_backward_reduce,
sync_batchnorm_elemt,sync_batchnorm_gather_stats_with_counts,sync_batchnorm_stats。

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 <= 3e-3
      • float16 mlu diff1 <= 3e-3
    • diff2
      • float32 mlu diff2 <= 3e-3
      • float16 mlu diff2 <= 3e-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

[----------] Global test environment tear-down
[ SUMMARY  ] Total 8 cases of 6 op(s).
ALL PASSED.
[==========] 8 test cases from 6 test suites ran. (2229 ms total)
[  PASSED  ] 8 test cases.

Platform:MLU590

[----------] Global test environment tear-down
[ SUMMARY  ] Total 8 cases of 6 op(s).
ALL PASSED.
[==========] 8 test cases from 6 test suites ran. (2905 ms total)
[  PASSED  ] 8 test cases.

3.4 Summary Analysis

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

@yuer-cn yuer-cn force-pushed the syncbn_forward branch 2 times, most recently from 652a771 to 797400d Compare September 25, 2023 08:42
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
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
@yuer-cn yuer-cn force-pushed the syncbn_forward branch 2 times, most recently from 4f753a5 to 1c8f8e4 Compare September 26, 2023 03:08
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 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
docs/bangc-docs/user_guide/9_operators/index.rst Outdated Show resolved Hide resolved
docs/bangc-docs/user_guide/9_operators/index.rst Outdated Show resolved Hide resolved
bangc-ops/mlu_op.h Outdated Show resolved Hide resolved
@PetrelYy PetrelYy added the BANGC label Sep 27, 2023
@PetrelYy PetrelYy added this to the v0.9.0 milestone Sep 27, 2023
@PetrelYy PetrelYy merged commit 7ccae9d into Cambricon:master Sep 27, 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