Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type conversion pattern for empty op #2162

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

mmanzoorTT
Copy link
Contributor

Stablehlo to TTIR conversion uses a customized type convertor. Use the same type convertor for tensor::empty op as well to ensure consistency.

closes #2161

Ticket

#2161

Problem description

Stablehlo to TTIR conversion pass apply custom pass to convert unsupported data types to supported data types. which is not applied to tensor::emptyop. This causes stablehlo to TTIR conversion to fail for empty op with unsupported data types.

What's changed

Add a conversion pattern for tensor::emptyop to apply custom type convertor and match the output with stablehlo to TTIR conversion pass.

Checklist

  • New tests provide coverage for changes

@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/empty-boolean-tensor branch 2 times, most recently from c0d7372 to d1eb6ea Compare February 19, 2025 16:01
Stablehlo to TTIR conversion uses a customized type convertor. Use the same type
convertor for tensor::empty op as well to ensure consistency.
@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/empty-boolean-tensor branch from d1eb6ea to 23f0b9a Compare February 19, 2025 16:02
@mmanzoorTT mmanzoorTT merged commit 6ec40d6 into main Feb 19, 2025
32 checks passed
@mmanzoorTT mmanzoorTT deleted the mmanzoor/empty-boolean-tensor branch February 19, 2025 16:52
vwellsTT pushed a commit that referenced this pull request Feb 20, 2025
Stablehlo to TTIR conversion uses a customized type convertor. Use the same type
convertor for tensor::empty op as well to ensure consistency.

### Ticket
#2161 

### Problem description
Stablehlo to TTIR conversion pass apply custom pass to convert
unsupported data types to supported data types. which is not applied to
tensor::emptyop. This causes stablehlo to TTIR conversion to fail for
empty op with unsupported data types.

### What's changed
Add a conversion pattern for tensor::emptyop to apply custom type
convertor and match the output with stablehlo to TTIR conversion pass.

### Checklist
- [X] New tests provide coverage for changes
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.

[StableHLO] Add conversion for empty op.
2 participants