Skip to content

Conversation

@anwang2009
Copy link
Contributor

@anwang2009 anwang2009 commented Apr 6, 2022

Adds abs to the FakeQuantizationToInteger pass.
Note that the FQ2I int abs implementation should not overflow, but rather clip when the absolute value of the minimum representable int value is taken. The FQ2I registration reflects this. Otherwise, in the fq2i test I was seeing abs(-128) => -128

@anwang2009
Copy link
Contributor Author

@anwang2009 anwang2009 changed the title [FIX][FQ2I] Add abs to FQ2I, fix abs implementation for int [FQ2I] Add abs to FQ2I Apr 7, 2022
@AndrewZhaoLuo AndrewZhaoLuo merged commit c5bd181 into apache:main Apr 9, 2022
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Apr 11, 2022
* add abs to fq2i

* lint

* special case for fq2i

* np iinfo
Lucien0 pushed a commit to Lucien0/tvm that referenced this pull request Apr 19, 2022
* add abs to fq2i

* lint

* special case for fq2i

* np iinfo
altanh pushed a commit to altanh/tvm that referenced this pull request Apr 28, 2022
* add abs to fq2i

* lint

* special case for fq2i

* np iinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants