This is an archive of the discontinued LLVM Phabricator instance.

[TOSA] Add QuantizationDialect to TOSA's dependentDialects
ClosedPublic

Authored by Tai78641 on Apr 27 2023, 9:11 AM.

Details

Summary

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

Diff Detail

Event Timeline

Tai78641 created this revision.Apr 27 2023, 9:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2023, 9:11 AM
Tai78641 requested review of this revision.Apr 27 2023, 9:11 AM
eric-k256 accepted this revision.May 5 2023, 3:10 PM
eric-k256 added a reviewer: rsuderman.

LGTM.

This revision is now accepted and ready to land.May 5 2023, 3:10 PM
This revision was automatically updated to reflect the committed changes.