8000 Emit a warning when one of the iree-input-demote-* passes is used. by benvanik · Pull Request #20784 · iree-org/iree · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Emit a warning when one of the iree-input-demote-* passes is used. #20784

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

Merged
merged 1 commit into from
May 12, 2025

Conversation

benvanik
Copy link
Collaborator

This only warns when public function signatures change and reports the diff for each that has a signature change.

As an example when compiling an input with two exported functions using f64 types we'll now display:

$ ../iree-build/tools/iree-compile -o=../iree-tmp/x.vmfb samples/static_library/simple_mul.mlir

WARNING: ConvertTypesPass (--iree-input-demote-*-to-*) changed public function signatures; callers at runtime must match the new expected I/O types:

  Old signature:
    @simple_mul1(tensor<4xf64>, tensor<4xf64>) -> tensor<4xf64>
  New signature:
    @simple_mul1(tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>

  Old signature:
    @simple_mul2(tensor<4xf64>, tensor<4xf64>) -> tensor<4xf64>
  New signature:
    @simple_mul2(tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>

Fixes #20774.

This only warns when public function signatures change and reports the
diff for each that has a signature change.

Fixes #20774.
@benvanik benvanik requested a review from ScottTodd May 12, 2025 15:49
@benvanik benvanik marked this pull request as ready for review May 12, 2025 16:06
@benvanik benvanik requested a review from rsuderman May 12, 2025 16:06
@benvanik benvanik added compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) quality of life 😊 Nice things are nice; let's have some labels May 12, 2025
@benvanik benvanik enabled auto-merge (squash) May 12, 2025 16:06
Copy link
Member
@ScottTodd ScottTodd left a comment

Choose a reason for hiding this comment

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

Nice!

@benvanik benvanik merged commit 647d1f4 into main May 12, 2025
45 checks passed
@benvanik benvanik deleted the users/benvanik/warn-on-demote branch May 12, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/dialects Relating to the IREE compiler dialects (flow, hal, vm) quality of life 😊 Nice things are nice; let's have some
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function with f64 tensor argument is compiled to use f32
2 participants
0