Skip to content

Don't drop signedness semantics when narrowing 64-bit ints - #5738

Merged
GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:type-converter-sign-correctness
May 5, 2021
Merged

GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:type-converter-sign-correctness

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented May 4, 2021 •

Copy link
Copy Markdown
Member

This is dangerous and not necessary. The proper fix is to add support for lowering
unsigned ints from mhlo to linalg and dropping the signedness there along with
encoding it in the operations used. I've sent patches to do this for the lowerings we
currently care about to avoid regression on ASR.

Fixes #5383

@google-cla google-cla Bot added the cla: yes label May 4, 2021
@GMNGeoffrey GMNGeoffrey changed the title type converter sign correctness Don't drop signedness semantics when narrowing 64-bit ints May 4, 2021
@GMNGeoffrey

GMNGeoffrey commented May 4, 2021 •

Copy link
Copy Markdown
Member Author

Dependent on #5736. Only the last commit is part of this PR

@GMNGeoffrey
GMNGeoffrey requested a review from benvanik May 4, 2021 22:43
@GMNGeoffrey
GMNGeoffrey force-pushed the type-converter-sign-correctness branch from f1caddd to 4a385b1 Compare May 5, 2021 01:18
@GMNGeoffrey
GMNGeoffrey merged commit 7132e4a into iree-org:main May 5, 2021
@GMNGeoffrey
GMNGeoffrey deleted the type-converter-sign-correctness branch May 5, 2021 18:08
@ScottTodd ScottTodd mentioned this pull request May 6, 2021
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.

Revisit signed/unsigned integer in IREE

2 participants