iree-org / iree-org/iree

pass demote-i64-to-i32 error

Open
#17,546 0 comments 0 reactions 0 assignees View on GitHub
bug 🐞
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
4d 16h
Merged PRs (30d)
47

Description

### What happened?

root@cltech218:/workspace/bailuan/official_iree/iree-build/tools# ./iree-opt --iree-input-conversion-demote-i64-to-i32 --iree-input-conversion-demote-f64-to-f32 --iree-preprocessing-convert-conv2d-to-img2col /workspace/bailuan/SHARK-Turbine/out/clip_linalg_new.mlir -o /workspace/bailuan/
SHARK-Turbine/out/clip_linalg_pass_new.mlir
/workspace/bailuan/SHARK-Turbine/out/clip_linalg_new.mlir:235:14: error: 'arith.constant' op failed to verify that all of {value, result} have same type
%cst_9 = arith.constant dense_resource : tensor<1x77xi64>
^
/workspace/bailuan/SHARK-Turbine/out/clip_linalg_new.mlir:235:14: note: see current operation: %15 = "arith.constant"() <{value = dense_resource : tensor<1x77xi64>}> : () -> tensor<1x77xi32>

### Steps to reproduce your issue

I use shark-turbine to export a clip linalg from sd model. When i try to use "demote-i64-to-i32" pass to make a type conversion, error ocurrs.
you can use command line and below linalg to reproduce.
[test.txt](https://github.com/user-attachments/files/15528386/test.txt)

### What component(s) does this issue relate to?

_No response_

### Version information

iree: e52b8bf3d4c1e09cca661bc5345a4c0dce5a6f54

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.