Skip to content

[hlo] Unbreak hlo-legalize-to-lhlo test - #43069

Merged
tensorflow-copybara merged 1 commit into
tensorflow:masterfrom
ehsan-nt:fix_hlo_legalize_to_lhlo_test
Sep 10, 2020
Merged

tensorflow-copybara merged 1 commit into
tensorflow:masterfrom
ehsan-nt:fix_hlo_legalize_to_lhlo_test

Conversation

@ehsan-nt

@ehsan-nt ehsan-nt commented Sep 9, 2020

Copy link
Copy Markdown

The legalization of mlhlo.ReturnOp to lhlo.TerminatorOp by using BufferAssignmentReturnOpConverter fails since the Memref typed results (or the Memref typed operands of Return operation) are set to stay as results after legalization but lhlo.TerminatorOp doesn't accept any operands. Therefore, BufferAssignmentReturnOpConverter must be replaced with a manual conversion that removes all operands of mlhlo.ReturnOp and inserts copy operations in their places.

@google-ml-butler google-ml-butler Bot added the size:S CL Change Size: Small label Sep 9, 2020
@google-ml-butler
google-ml-butler Bot requested a review from joker-eph September 9, 2020 10:02
@pifon2a pifon2a added the ready to pull PR ready for merge process label Sep 9, 2020
pifon2a
pifon2a previously approved these changes Sep 9, 2020
@google-ml-butler google-ml-butler Bot added the kokoro:force-run Tests on submitted change label Sep 9, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Sep 9, 2020
@gbaned gbaned self-assigned this Sep 9, 2020
@sherhut

sherhut commented Sep 9, 2020

Copy link
Copy Markdown

Please resolve conflicts with the recent LLVM integrate.

@gbaned gbaned removed the ready to pull PR ready for merge process label Sep 9, 2020
@ehsan-nt
ehsan-nt force-pushed the fix_hlo_legalize_to_lhlo_test branch from a4f946a to e39f1aa Compare September 9, 2020 15:31

@sherhut sherhut left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please also fix the style. Sorry, I missed this the first time round.

@ehsan-nt
ehsan-nt force-pushed the fix_hlo_legalize_to_lhlo_test branch from e39f1aa to 8be0435 Compare September 10, 2020 08:41

@sherhut sherhut left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks!

@google-ml-butler google-ml-butler Bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Sep 10, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Sep 10, 2020
copybara-service Bot pushed a commit to tensorflow/mlir-hlo that referenced this pull request Sep 10, 2020
Imported from GitHub PR tensorflow/tensorflow#43069

The legalization of mlhlo.ReturnOp to lhlo.TerminatorOp by using BufferAssignmentReturnOpConverter fails since the Memref typed results (or the Memref typed operands of Return operation) are set to stay as results after legalization but lhlo.TerminatorOp doesn't accept any operands. Therefore, BufferAssignmentReturnOpConverter must be replaced with a manual conversion that removes all operands of mlhlo.ReturnOp and inserts copy operations in their places.
Copybara import of the project:

--
8be0435b0147263c3872bedec58fd215f784b450 by Ehsan Toosi <[email protected]>:

[hlo] Unbreak hlo-legalize-to-lhlo test

COPYBARA_INTEGRATE_REVIEW=tensorflow/tensorflow#43069 from dfki-ehna:fix_hlo_legalize_to_lhlo_test 8be0435b0147263c3872bedec58fd215f784b450
PiperOrigin-RevId: 330907602
@tensorflow-copybara
tensorflow-copybara merged commit 622d9a2 into tensorflow:master Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes ready to pull PR ready for merge process size:S CL Change Size: Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants