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 2020/10/22 16:42:11 UTC

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #6729: [Relay] Minor fix for some TF OD models

zhiics commented on a change in pull request #6729:
URL: https://github.com/apache/incubator-tvm/pull/6729#discussion_r510307254



##########
File path: include/tvm/topi/transform.h
##########
@@ -897,8 +897,14 @@ inline Tensor where(const Tensor& condition, const Tensor& x, const Tensor& y,
     return compute(
         condition->shape,
         [&](const Array<Var>& indices) {
-          Array<PrimExpr> condition_idx{indices[0]};
-          return tvm::tir::Select(condition(condition_idx) != 0, x(), y());
+          PrimExpr cond;
+          if (condition->shape.size() == 0) {
+            cond = condition();

Review comment:
       in this case, does cond != 0 alway hold?




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