Skip to content

[Encoding] Rename testing purpose encodings to follow the convention. - #21144

Merged
hanhanW merged 7 commits into
iree-org:mainfrom
hanhanW:encoding-refresh-testing-attr-name
Jun 24, 2025
Merged

hanhanW merged 7 commits into
iree-org:mainfrom
hanhanW:encoding-refresh-testing-attr-name

Conversation

@hanhanW

@hanhanW hanhanW commented Jun 19, 2025 •

Copy link
Copy Markdown
Contributor

As discussed in #20742, the resolvers should end with _resolver suffix, and the encoding is redundant for encoding type attributes. The revision updates the names for testing purpose encodings.

Resolver changes:

  • iree_encoding.identity_encoding -> iree_encoding.identity_resolver
  • iree_encoding.unsupported_encoding -> iree_encoding.unsupported_resolver
  • iree_encoding.unspecialized_encoding -> iree_encoding.specialization_resolver

Encoding type attribute changes:

  • iree_encoding.specialized_encoding -> iree_encoding.specialized
  • iree_encoding.unknown_encoding -> iree_encoding.unknown
  • iree_encoding.testing_encoding -> iree_encoding.testing

The revision also fixes a misuse for flow.tensor.encode roundtrip tests in flow_ops.mlir, which should use encoding type attributes but not resolvers.

It is a step towards #20742

@hanhanW
hanhanW requested a review from jtuyls June 19, 2025 21:57
@hanhanW
hanhanW marked this pull request as ready for review June 19, 2025 22:09
Signed-off-by: hanhanW <[email protected]>

@jtuyls jtuyls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just one comment/question

// CHECK-SAME: %[[ARG1:.[a-zA-Z0-9]+]]
#encoding = #iree_encoding.unspecialized_encoding<123>
#encoding1 = #iree_encoding.unspecialized_encoding<456>
#encoding = #iree_encoding.specialized<123>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Didn't you rename #iree_encoding.unspecialized_encoding to #iree_encoding.specialization_resolver?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's a misuse. I identified it when I did the replacements. Let me reflect the change in the PR description, I missed it. (I only had a separate commit mentioned it.)

@hanhanW
hanhanW enabled auto-merge (squash) June 24, 2025 15:34
@hanhanW
hanhanW merged commit 02c0c71 into iree-org:main Jun 24, 2025
@hanhanW
hanhanW deleted the encoding-refresh-testing-attr-name branch June 24, 2025 16:09
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
…#21144)

As discussed in #20742, the
resolvers should end with `_resolver` suffix, and the encoding is
redundant for encoding type attributes. The revision updates the names
for testing purpose encodings.

Resolver changes:
- iree_encoding.identity_encoding -> iree_encoding.identity_resolver
- iree_encoding.unsupported_encoding ->
iree_encoding.unsupported_resolver
- iree_encoding.unspecialized_encoding ->
iree_encoding.specialization_resolver

Encoding type attribute changes:
- iree_encoding.specialized_encoding -> iree_encoding.specialized
- iree_encoding.unknown_encoding -> iree_encoding.unknown
- iree_encoding.testing_encoding -> iree_encoding.testing 

The revision also fixes a misuse for `flow.tensor.encode` roundtrip
tests in `flow_ops.mlir`, which should use encoding type attributes but
not resolvers.

It is a step towards #20742

---------

Signed-off-by: hanhanW <[email protected]>
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.

2 participants