You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "echuraev (via GitHub)" <gi...@apache.org> on 2023/05/12 06:49:26 UTC

[GitHub] [tvm] echuraev commented on a diff in pull request #14833: [Codegen][OpenCL] fix amibiguous selection operator call

echuraev commented on code in PR #14833:
URL: https://github.com/apache/tvm/pull/14833#discussion_r1191974289


##########
src/target/source/codegen_opencl.cc:
##########
@@ -567,11 +567,7 @@ void CodeGenOpenCL::VisitExpr_(const SelectNode* op, std::ostream& os) {
   os << ", ";
   PrintExpr(op->condition, oss);
   if (op->dtype.is_float()) {
-    if (op->condition.dtype().is_uint() || op->condition.dtype().is_int()) {
-      os << oss.str();
-    } else {
-      os << CastTo(oss.str(), DataType::Int(op->dtype.bits(), op->dtype.lanes()));
-    }
+    os << CastTo(oss.str(), DataType::Int(op->dtype.bits(), op->dtype.lanes()));

Review Comment:
   Could you please add a unit test for this change? I suppose it might be similar with [test_opencl_type_casting](https://github.com/apache/tvm/blob/main/tests/python/unittest/test_target_codegen_opencl.py#L142-L184).



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