Skip to content

[Fix][Relax] Normalize tuple projections before rewriting mixed-precision outputs - #21078

Open
tandede wants to merge 1 commit into
apache:mainfrom
tandede:fix/relax-mixed-precision-tuple-types
Open

tandede wants to merge 1 commit into
apache:mainfrom
tandede:fix/relax-mixed-precision-tuple-types

Conversation

@tandede

@tandede tandede commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

When a dataflow block returns a tuple field directly, ToMixedPrecision clears its type after remapping the tuple. Rewriting the output then calls GetType before the projection has a type. Normalize the remapped projection before checking whether the output needs a cast.

The regression test returns a field of split and checks the resulting IR with both FP32 and FP16 inputs. With an FP16 input, the split stays in FP16 and the returned field is cast back to FP32. All 17 tests in the mixed-precision transform suite passed locally.

Fixes #21070.

OpenAI Codex helped prepare and test this change.

This branch has not been deployed

No deployments
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.

[Bug] [Relax] ToMixedPrecision crashes with missing expr type on tuple-returning ops (batch_norm, dropout, topk, split)

1 participant