masahi commented on a change in pull request #6383:
URL: https://github.com/apache/incubator-tvm/pull/6383#discussion_r482351107



##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -1663,7 +1663,12 @@ bool WhereRel(const Array<Type>& types, int num_inputs, 
const Attrs& attrs,
           << "condition and x must have the same shape: " << cond_shape << " 
vs " << x_shape;
     }
   }
-  reporter->Assign(types[3], TensorType(x_shape, x->dtype));
+  if (x_shape.size() == 0) {
+    // if x and y are scalar, the condition shape becomes the output shape

Review comment:
       It is checked in
   
https://github.com/apache/incubator-tvm/blob/6ed242eadebee61e7da2ad468519661acfe31b84/src/relay/op/tensor/transform.cc#L1654
   
   Happy to be more explicit if you prefer that way




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


Reply via email to