You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/02/14 12:01:22 UTC

[GitHub] [tvm] FrozenGene opened a new pull request #7456: [QNN][TFLite] TFLite rounding mode support

FrozenGene opened a new pull request #7456:
URL: https://github.com/apache/tvm/pull/7456


   Almost work is done by @Fwd-IV Thanks! I just port it from https://github.com/apache/tvm/pull/4828. 
   
   Some other import changes should be noticed is in the rewrite_simplify.cc / canonical_simplify.cc. We introduce expression complexity to determine whether we should do these optimizations. After introducing tflite rounding, we will have complex expressions, like this:
   ![image](https://user-images.githubusercontent.com/7287321/107876111-eb198980-6efe-11eb-96b3-858693cbc4bf.png)
   
   If we don't disable this , we even can not compile whole mobilenet v2 quantized model successfully.
   
   This is also initial support for TFLite bit extract comparison . I think we have more work to do for more models.
    
   
   Co-author-by: @Fwd-IV 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] mbrookhart commented on pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #7456:
URL: https://github.com/apache/tvm/pull/7456#issuecomment-825867803


   @FrozenGene Any chance you can rebase and fix CI?
   
   Thanks!


-- 
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:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #7456:
URL: https://github.com/apache/tvm/pull/7456#issuecomment-780602116


   Thanks @FrozenGene can you move the analysis change to a separate PR so we can review that part carefully 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] jroesch commented on pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
jroesch commented on pull request #7456:
URL: https://github.com/apache/tvm/pull/7456#issuecomment-1016829258


   This PR appears to be out of date, please feel free to reopen it if this is not the case.
   
   As part of the new year we are attempting to triage the project's open pull requests to ensure that code which
   is ready for review and/or merging receives adequate attention.
   
   Thanks again for your contribution, and feel free to reach out to discuss these changes.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] FrozenGene commented on pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
FrozenGene commented on pull request #7456:
URL: https://github.com/apache/tvm/pull/7456#issuecomment-781253560


   > Thanks @FrozenGene can you move the analysis change to a separate PR so we can review that part carefully
   
   have separated it and resolve your comment 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on a change in pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #7456:
URL: https://github.com/apache/tvm/pull/7456#discussion_r577665517



##########
File path: include/tvm/tir/analysis.h
##########
@@ -56,6 +57,55 @@ struct ExprDeepEqual {
   TVM_DLL bool operator()(const PrimExpr& lhs, const PrimExpr& rhs) const;
 };
 
+#define PLUS_ONE(OP) \
+  void VisitExpr_(const OP* op) final { num_symbols_++; }
+
+#define PLUS_ONE_BINARY(OP)             \
+  void VisitExpr_(const OP* op) final { \
+    num_symbols_++;                     \
+    VisitExpr(op->a);                   \
+    VisitExpr(op->b);                   \
+  }
+
+/*!
+ * \brief Calculate the expresion complexity based on number of symbols it contains.
+ */
+class ExprComplexity : public ExprVisitor {

Review comment:
       Consider move to src/tir/analysis/ and leave a function interface here




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [tvm] jroesch closed pull request #7456: [QNN][TFLite] TFLite rounding mode support

Posted by GitBox <gi...@apache.org>.
jroesch closed pull request #7456:
URL: https://github.com/apache/tvm/pull/7456


   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org