LiangHao151941 commented on a change in pull request #4828: [QNN][TFLite] TFLite rounding mode support URL: https://github.com/apache/incubator-tvm/pull/4828#discussion_r376852996
########## File path: include/tvm/relay/qnn/attrs.h ########## @@ -44,14 +44,15 @@ struct RequantizeAttrs : public tvm::AttrsNode<RequantizeAttrs> { .set_default(-1); TVM_ATTR_FIELD(rounding).set_default("UPWARD") .describe("Defines the rounding direction when the value is midway between" - "two representable values. There are two supported modes - UPWARD" - "or TONEAREST. Both modes behave exactly same except at the" + "two representable values. There are two 3 modes - UPWARD, TONEAREST" + "or TFLITE. UP/TONEAREST modes behave exactly same except at the" "midpoints between the two representable values. At the midpoint," "UPWARD rounds towards positive infinity (for example -1.5 will be" "rounded to -1). TONEAREST is the standard rounding where the" "value is rounded away from zero at midpoints (for example, -1.5" "rounds to -2). More context can be found at following gblic manual" - "https://www.gnu.org/software/libc/manual/html_node/Rounding.html."); + "https://www.gnu.org/software/libc/manual/html_node/Rounding.html." + "TFLITE mode is more complicated, referring to tflite implementation."); Review comment: TFLite version is 1.13, conforming with relay tflite frontend. The rounding implementation is here https://github.com/tensorflow/tensorflow/blob/r1.13/tensorflow/lite/kernels/internal/common.h#L105, but according to community norm, external links should be better removed to avoid license issues? @FrozenGene ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services