This is an archive of the discontinued LLVM Phabricator instance.

Add CalibratedQuantizedType to quant dialect

Authored by teijeong on Nov 16 2020, 7:52 PM.



This type supports a calibrated type with min, max provided.

This will be used for importing calibration values of intermediate tensors (e.g. LSTM) which can't be imported with QuantStats op.

This type was initially suggested in the following RFC:

Diff Detail

Event Timeline

teijeong created this revision.Nov 16 2020, 7:52 PM
teijeong requested review of this revision.Nov 16 2020, 7:52 PM
stellaraccident accepted this revision.Nov 16 2020, 9:48 PM

Wow, that has been a minute since that was discussed. I'm not 100% sure these days that I would encode this in the type system if I were doing it, but having the representation to do it is fine with me.

This revision is now accepted and ready to land.Nov 16 2020, 9:48 PM

Wow what a coincidence, thanks for quick review!

I don't have commit permission yet - can someone help me submitting this?

liufengdb added inline comments.Nov 17 2020, 8:42 AM

remove this storage type.


alphabeta order?

teijeong updated this revision to Diff 305968.Nov 17 2020, 8:53 PM

Updating D91584: Add CalibratedQuantizedType to quant dialect

teijeong marked 2 inline comments as done.Nov 17 2020, 8:53 PM
This revision was automatically updated to reflect the committed changes.