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 2022/04/25 15:07:26 UTC

[GitHub] [tvm] jacobbohlin commented on a diff in pull request #10509: [microNPU] Add various options to the cascader

jacobbohlin commented on code in PR #10509:
URL: https://github.com/apache/tvm/pull/10509#discussion_r857735462


##########
python/tvm/contrib/ethosu/cascader/block_config.py:
##########
@@ -45,5 +45,17 @@ def compute_cycles(self) -> int:
     def output_cycles(self) -> int:
         return int(self._output_cycles)
 
+    def __ge__(self, other: "BlockConfig"):
+        if len(self.output_shape) != len(other.output_shape):
+            return False
+
+        return all(a >= b for a, b in zip(self.output_shape, other.output_shape))
+
+    def __lt__(self, other: "BlockConfig"):
+        if len(self.output_shape) != len(other.output_shape):
+            return False
+
+        return other >= self

Review Comment:
   Yes, I thought the easiest way to define strict **less than** in this case was as the inverse of  **greater or equal**, i.e. `__ge__`.



-- 
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