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/05/27 10:43:37 UTC

[GitHub] [tvm] echuraev commented on a diff in pull request #11488: [OpenCL] Avoid SelectNode ambiguous overloading

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


##########
src/target/source/codegen_opencl.cc:
##########
@@ -540,16 +540,6 @@ void CodeGenOpenCL::VisitExpr_(const OrNode* op, std::ostream& os) {
   os << ")";
 }
 

Review Comment:
   ```suggestion
   void CodeGenOpenCL::VisitExpr_(const SelectNode* op, std::ostream& os) {
     std::ostringstream oss;
     os << "select(";
     PrintExpr(op->false_value, oss);
     os << CastFromTo(oss.str(), op->false_value.dtype(), op->dtype);
     oss.str("");
     os << ", ";
     PrintExpr(op->true_value, oss);
     os << CastFromTo(oss.str(), op->true_value.dtype(), op->dtype);
     oss.str("");
     os << ", ";
     PrintExpr(op->condition, os);
     os << ")";
   }
   ```



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