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

[DIP] Add benchmark for Buddy & OpenCV rotation operation. #63

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

taiqzheng
Copy link
Contributor

For Buddy Rotate2D operation, use command ./image-processing-rotate-benchmark <image path> <Rotate option> <RotateAngle>. Here Rotate option available are DEGREE, RADIAN. RotateAngle accepts a float number for Rotate option.
Examples:
./image-processing-rotate-benchmark ../../benchmarks/ImageProcessing/Images/YuTu.png RADIAN 1.57
OR
./image-processing-rotate-benchmark ../../benchmarks/ImageProcessing/Images/YuTu.png DEGREE 45

For OpenCV rotate(), it only supports 90, 180 and 270 degree. Only accepted when using DEGREE option and an integer( Num % 90 = 0). Like:
./image-processing-rotate-benchmark ../../benchmarks/ImageProcessing/Images/YuTu.png DEGREE 270

Copy link
Member

@meshtag meshtag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your work on this!

benchmarks/ImageProcessing/BuddyRotate2DBenchmark.cpp Outdated Show resolved Hide resolved
benchmarks/ImageProcessing/BuddyRotate2DBenchmark.cpp Outdated Show resolved Hide resolved
benchmarks/ImageProcessing/OpenCVRotate2DBenchmark.cpp Outdated Show resolved Hide resolved
Copy link
Member

@zhanghb97 zhanghb97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reformat all the c++ file with clang-format.

@taiqzheng taiqzheng requested a review from zhanghb97 June 7, 2023 02:31
@taiqzheng
Copy link
Contributor Author

Please reformat all the c++ file with clang-format.

The code have been reformat with clang-format -i -style=file command.

@taiqzheng taiqzheng marked this pull request as draft June 8, 2023 06:54
@taiqzheng
Copy link
Contributor Author

Will delete the OpenCV enum class after exams(before the weekend).

@meshtag
Copy link
Member

meshtag commented Jun 12, 2023

I expect the rotation operation to be improved from this PR. Shall we move ahead and review this once that patch lands?

Or do you want me to move ahead with the review process now?

Also, please mark the PR as "ready for review" once you think it is ready.

- Use clang-format for rotate benchmark files.
@taiqzheng
Copy link
Contributor Author

Shall we move ahead and review this once that patch lands?

Or do you want me to move ahead with the review process now?

If the acceleration PR changes the API, then it will be better to review that PR first.

@taiqzheng taiqzheng marked this pull request as ready for review June 12, 2023 08:46
EllisLambda pushed a commit to EllisLambda/buddy-benchmark that referenced this pull request Sep 21, 2023
…-compiler#63)

* Add lit-test for correlation2D

* Add correlation i32 test

* Add support for i32 correlation 2d

* Enable default attribute printing for DIP

* Add a check for compatbility return type

* Update lit test to find mlir cpu utils

* Make output to be param for Corr2d

  - having it as a return value causes to segfault correlation2D sample
    - it is not clear how to return MemRef from C-interface

* Mark attributes with <> in dip.mlir

* Add a operand type check for Corr2D op and a test

  - Make sure that input, kernel, output and constant have the same
    value and use as inferred type
  - Adding a negative lit test to check params of the op

* Fix review comments

* Add support for i8,i64,f64

* Fix correlation2D_f64 test

 * by constructing F64 correctly

* Fix review comment and formatting issues

* Fix more review comment

  - extend correlation2d_invalid_type test to cover a condition for supported types
  - add comments for utility functions

* Remove insertZeroConstantOp from LowerDIPPass

  - it is present in DIPItility.h

* Trivial changes

Co-authored-by: meshtag <prathameshtagore@gmail.com>
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.

3 participants