Skip to content

[TorchToLinalg] Fix i8 scalar dtype conversion by passing dstOriginalDtype#4454

Open
snarang181 wants to merge 1 commit intollvm:mainfrom
snarang181:fix-dstoriginaldtype-i8
Open

[TorchToLinalg] Fix i8 scalar dtype conversion by passing dstOriginalDtype#4454
snarang181 wants to merge 1 commit intollvm:mainfrom
snarang181:fix-dstoriginaldtype-i8

Conversation

@snarang181
Copy link

This fixes an iree-compile failure when lowering Torch programs that require converting scalars/elements to an 8-bit integer destination (Byte/Char). convertScalarToDtype requires dstOriginalDtype for i8 because Torch distinguishes Byte (u8) vs Char (i8) while MLIR integers are often signless; without this metadata the helper emits unimplemented.

(Motivated by iree-org/iree#23136)

Signed-off-by: Samarth Narang <[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.

1 participant

Comments