shinh commented on PR #14536:
URL: https://github.com/apache/tvm/pull/14536#issuecomment-1539435547
Does this make sense to add this `qnn.softmax` implementation as an optional
feature? By default, we wouldn't enable qnn.softmax, but users could activate
it when they find its precision satisfactory for their use case. To be more
specific, I propose the following:
1. Add `@register_optional_fake_quantization_to_integer` and use it in
fake_quantization_to_integer.py for `softmax`:
```
@register_optional_fake_quantization_to_integer("nn.softmax")
def softmax(expr, type_map):
...
```
2. Modify `fake_quantization_to_integer.cc` so that optional rewriters will
be ignored unless users explicitly state they want to use quantized softmax by
something like
```
relay.transform.FakeQuantizationToInteger(optional_qnn_ops={"nn.softmax"})(mod)
```
I guess it's OK to relax checks of unittests if this feature is optional?
What are your thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]