-
Notifications
You must be signed in to change notification settings - Fork 165
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
Infer operation data type based on its params for Corr2D #63
Infer operation data type based on its params for Corr2D #63
Conversation
- having it as a return value causes to segfault correlation2D sample - it is not clear how to return MemRef from C-interface
- 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
2a25644
to
566afc8
Compare
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 introducing llvm style tests for the DIP
dialect!
Overall, I don't see any major issue with the implementation mechanism and I think you can continue with the rest of the implementation for covering remaining types.
Please take a look one more time. |
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.
I'll build this branch and have a more detailed look once the issue with f64
test is fixed.
* by constructing F64 correctly
|
- extend correlation2d_invalid_type test to cover a condition for supported types - add comments for utility functions
- it is present in DIPItility.h
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.
LGTM! (/cc @zhanghb97 )
Thanks @ArtemSkrebkov !
Thanks @ArtemSkrebkov @meshtag ! |
…-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 <[email protected]>
…-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 <[email protected]>
Motivation
Opens