summaryrefslogtreecommitdiff
path: root/mlir
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2023-05-15 15:08:29 -0700
committerEric Kunze <eric.kunze@arm.com>2023-05-15 15:09:02 -0700
commit4a899a35182be83ba46ae7906f0ce80ae800ef35 (patch)
treefef93f6d483cdd1711f510f8b677d6588694ce4b /mlir
parent528a9e46bd2fb57ac854b591f68421fe1b050cfb (diff)
downloadllvm-4a899a35182be83ba46ae7906f0ce80ae800ef35.tar.gz
[TOSA] Add QuantizationDialect to TOSA's dependentDialects
This adds QuantizationDialect to the dependent dialects of TOSA This fixes the intermittent bug when creating uniform quantized type when none was parsed in. LLVM ERROR: can't create type 'mlir::quant::UniformQuantizedType' because storage uniquer isn't initialized: the dialect was likely not loaded, or the type wasn't added with addTypes<...>() in the Dialect::initialize() method. This happens, for example, in convert-tfl-uint8 pass when trying to create uniform quantized type i8 with zero-point=-128 to convert from ui8 type. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I204248a45fd728d0cec8dc20214cb0b74de81e7b Reviewed By: eric-k256 Differential Revision: https://reviews.llvm.org/D149354
Diffstat (limited to 'mlir')
-rw-r--r--mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
index 5d25f8d0a404..41fbdcaea095 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
@@ -40,7 +40,7 @@ def Tosa_Dialect : Dialect {
there will be tools to lower from the ML frameworks into TOSA.
}];
- let dependentDialects = ["tensor::TensorDialect"];
+ let dependentDialects = ["tensor::TensorDialect", "quant::QuantizationDialect"];
let cppNamespace = "mlir::tosa";
let hasConstantMaterializer = 1;