llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.13k stars 12.01k forks source link

[compile bugs] Can't get scale and zeropoint #71781

Closed imyzx2023 closed 1 year ago

imyzx2023 commented 1 year ago

Here is the bug: How to fix it??

%119 = "top.Add"(%102, %118) {do_relu = false, relu_limit = -1.000000e+00 : f64} : (tensor<512x1x4096xf32>, tensor<512x1x4096xf32>) -> tensor<512x1x4096xf32> loc("hidden_states_Add")
can't get scale and zeropoint

image

llvmbot commented 1 year ago

@llvm/issue-subscribers-mlir

Author: ZekeYi (imyzx2023)

Here is the bug: How to fix it?? ```console %119 = "top.Add"(%102, %118) {do_relu = false, relu_limit = -1.000000e+00 : f64} : (tensor<512x1x4096xf32>, tensor<512x1x4096xf32>) -> tensor<512x1x4096xf32> loc("hidden_states_Add") can't get scale and zeropoint ``` ![image](https://github.com/llvm/llvm-project/assets/129168209/4eda6674-6342-4e8e-a46c-6f93eeedbe4d)
fhahn commented 1 year ago

@imyzx2023 could you provide a full test case?

fhahn commented 1 year ago

Also, this crashes in /workspace/tpu-mlir/lib/Support/Module.cpp: 1056 which looks like the code lives in https://github.com/sophgo/tpu-mlir, not in llvm-project/mlir.

AFAICT the issue should be reported to that project, or we need a reproduce that shows the issue on llvm-project/mlir. Closing for now, please let me know if the assessment is incorrect and I'll re-open.