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

Fix mlir printer arguments to match new signatures #392

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

nirvedhmeshram
Copy link
Contributor

The function signatures seem to have changed after
llvm/llvm-project#75099

without this change I get

TypeError: print(): incompatible function arguments. The following argument types are supported:
    1. (self: iree.compiler._mlir_libs._mlir.ir._OperationBase, state: mlir::python::PyAsmState, file: object = None, binary: bool = False) -> None       
    2. (self: iree.compiler._mlir_libs._mlir.ir._OperationBase, large_elements_limit: Optional[int] = None, enable_debug_info: bool = False, pretty_debug_info: bool = False, print_generic_op_form: bool = False, use_local_scope: bool = False, assume_verified: bool = False, file: object = None, binary: bool = False) -> None

I think the file vraible is being confused with the AsmState variable.

Copy link
Contributor

@stellaraccident stellaraccident left a comment

Choose a reason for hiding this comment

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

Probably API drift. Better to be explicit like this. Thanks

@nirvedhmeshram nirvedhmeshram merged commit cc61977 into main Feb 4, 2024
3 of 4 checks passed
@nirvedhmeshram nirvedhmeshram deleted the fix_aot_printer_nm branch February 4, 2024 23:39
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