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): new op roi_pooling_forward #806

Merged
merged 1 commit into from
Aug 18, 2023
Merged

[Feature](bangc-ops): new op roi_pooling_forward #806

merged 1 commit into from
Aug 18, 2023

Conversation

dcmee336
Copy link
Collaborator

@dcmee336 dcmee336 commented Aug 17, 2023

Thanks for your contribution and we appreciate it a lot.

1. Motivation

Add new op roi_pooling_forward.

2. Modification

create bangc-ops/kernels/roi_pooling_forward/roi_pooling_forward.cpp
create bangc-ops//test/mlu_op_gtest/pb_gtest/src/zoo/roi_pooling_forward/roi_pooling_forward.cpp
create bangc-ops//test/mlu_op_gtest/pb_gtest/src/zoo/roi_pooling_forward/roi_pooling_forward.h
create bangc-ops//test/mlu_op_gtest/pb_gtest/src/zoo/roi_pooling_forward/test_case/case_0.prototxt

change bangc-ops/mlu_op.h
change docs/bangc-docs/user_guide/9_operators/index.rst
change bangc-ops/kernels/kernel_wrapper/lib/libextops.a
change bangc-ops/kernels/kernel_wrapper/wrapper.h

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.

  • diff1: diff1 <= 3e-3
  • diff2: diff2 <= 3e-3

3.1.2 Operator Scheme checklist

No. Details Check Results
1 Supported hardware MLU370
MLU590
2 Job types U1
3 Layouts input, output: NHWC 、rois: ARRAY
4 Whether multi-dimensions are supported
5 Whether element zero is supported
6 Data type(half/float) half / float
7 Whether there is size limit

3.1.3 New Feature Test

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

  • Data type test
  • 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
  • Nan/INF tests
  • Bug fix tests
  • For memory leak check details, seeGTest-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.1.4 Parameter Check

When a new operator is submitted, the test points are given and the test results are stated.

Test Point Acceptance Standard Test Result (Error Message)
Whether it conforms to the operator restriction Normal error
Whether illegal parameters are passed Normal error

3.2 Accuracy Test

For the cases used in the New Feature Test section, the features and the number of cases are recorded here. When multiple operations are tested, multiple tables are needed to include details of these operations.

Operation:

Test Point Description Quantity Comment
Data type test half/float/ ALL PASS
Mult-tensor test Supports 1-8 dims NOT SUPPORT
Layout test Supports NHWC ALL PASS
Zero element test Whether to support this test ALL PASS
Stability test --gtest_repeat=NUM
--thread=NUM
ALL PASS
mlu-only mode test --mlu-only,see MLU-OPS Performance Acceptance Standard ALL PASS
Mult-platform test MLU370/MLU590 ALL PASS
Nan/INF test Whether to support this test ALL PASS
Memory leak check Test result ALL PASS
Code coverage check Test result

3.3 Performance Test

See MLU-OPS Performance Acceptance Standard for details.

Platform:MLU370

Operation Mlu_hardware_time(us) Mlu_interface_time(us) Mlu_io_efficiency Mlu_compute_efficiency Mlu_workwpace_size(Bytes) Data_type Shape
roi_pooling_forward 289 122.2 0.20961 0.0007 0 float32 input: [16, 64, 64, 48], output:[10, 12, 12, 68]
roi_pooling_forward 308 117.069 0.3593 0.0003 0 float16 input: [32, 128, 128, 32] output: [16, 12, 12, 32]

Platform:MLU590

Operation Mlu_hardware_time(us) Mlu_interface_time(us) Mlu_io_efficiency Mlu_compute_efficiency Mlu_workwpace_size(Bytes) Data_type Shape
roi_pooling_forward 238 86.6 0.038 0.0003 0 float32 input: [16, 64, 64, 48], output:[10, 12, 12, 68]
roi_pooling_forward 371 93 0.044 0.0001 0 float16 input: [32, 128, 128, 32] output: [16, 12, 12, 32]

3.4 Summary Analysis

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

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
@duzekunKTH duzekunKTH added this to the v0.8.0 milestone Aug 18, 2023
@duzekunKTH duzekunKTH added New Op Contribute a new operator BANGC_Binary labels Aug 18, 2023
@duzekunKTH
Copy link
Collaborator

commit 改为 [Feature](bangc-ops): new op roi_pooling_forward 吧。
同时 CI 挂了请看一下。

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
@dcmee336 dcmee336 changed the title [Feature](bangc-ops): add roi_pooling_forward op [Feature](bangc-ops): new op roi_pooling_forward Aug 18, 2023
@PetrelYy PetrelYy merged commit 1e8d587 into Cambricon:master Aug 18, 2023
1 check passed
@dcmee336 dcmee336 deleted the binary-op-roi_pooling branch May 27, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Op Contribute a new operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants