u99127 commented on a change in pull request #4629: [QNN] Channel wise
quantization - Quantize & Requantize
URL: https://github.com/apache/incubator-tvm/pull/4629#discussion_r364403117
##########
File path: include/tvm/relay/qnn/attrs.h
##########
@@ -33,10 +33,15 @@ namespace qnn {
/*! \brief Attribute for requantize operator */
struct RequantizeAttrs : public tvm::AttrsNode<RequantizeAttrs> {
+ int axis;
std::string rounding;
DataType out_dtype;
TVM_DECLARE_ATTRS(RequantizeAttrs, "relay.attrs.RequantizeAttrs") {
+ TVM_ATTR_FIELD(axis)
+ .describe("The output channel axis for channel wise quantization.
Default value is -1,"
+ "which corresponds to the last axis.")
Review comment:
Never mind , later in the thread things are a bit clearer. The axis of -1 is
fine - it is part of the per-channel quantization scheme .
In some sense I would have preferred to see a IsPerChannelQuantized
predicate, rather than reusing a IsConstScalar predicate further below but
that's a code hygiene thing.
And , yes sorry about the slow response, I'm a bit snowed under.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services