Skip to content

[mpmd] Fix attribute preservation and add tests for inline merge in UniquifyFunctionInputsOutputsPass.#1369

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_923406495
Open

[mpmd] Fix attribute preservation and add tests for inline merge in UniquifyFunctionInputsOutputsPass.#1369
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_923406495

Conversation

@copybara-service
Copy link
Copy Markdown

[mpmd] Fix attribute preservation and add tests for inline merge in UniquifyFunctionInputsOutputsPass.

  • Preserve inferred_by and call_counter attributes from the merge target
    through MergeRegionOps (which erases both operands). Previously,
    SetInferredByAttr was called on the erased merge_target, causing a
    use-after-free. Now we save attrs before the merge and restore after.
  • Replace unreachable return false in remove_if with SDY_CHECK assertion.
  • Add tests for block-argument-only fragments and producer-merge case.

…niquifyFunctionInputsOutputsPass.

- Preserve inferred_by and call_counter attributes from the merge target
  through MergeRegionOps (which erases both operands). Previously,
  SetInferredByAttr was called on the erased merge_target, causing a
  use-after-free. Now we save attrs before the merge and restore after.
- Replace unreachable `return false` in remove_if with SDY_CHECK assertion.
- Add tests for block-argument-only fragments and producer-merge case.

PiperOrigin-RevId: 923406495
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.

1 participant