-
Notifications
You must be signed in to change notification settings - Fork 39
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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!
There was a problem hiding this 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
.
The code have been reformat with |
Will delete the OpenCV enum class after exams(before the weekend). |
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.
If the acceleration PR changes the API, then it will be better to review that PR first. |
…-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>
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