echuraev commented on code in PR #11488:
URL: https://github.com/apache/tvm/pull/11488#discussion_r883946708
##########
src/target/source/codegen_opencl.cc:
##########
@@ -541,12 +541,26 @@ void CodeGenOpenCL::VisitExpr_(const OrNode* op,
std::ostream& os) {
}
void CodeGenOpenCL::VisitExpr_(const SelectNode* op, std::ostream& os) {
+ std::ostringstream oss;
os << "select(";
- PrintExpr(op->false_value, os);
+ PrintExpr(op->false_value, oss);
+ os << CastFromTo(oss.str(), op->false_value.dtype(), op->dtype);
+ oss.str("");
os << ", ";
- PrintExpr(op->true_value, os);
+ PrintExpr(op->true_value, oss);
+ os << CastFromTo(oss.str(), op->true_value.dtype(), op->dtype);
+ oss.str("");
os << ", ";
- PrintExpr(op->condition, os);
+ PrintExpr(op->condition, oss);
+ if (op->dtype.is_float()) {
Review Comment:
Sorry, my bad. I wasn't careful enough when I read the header file. Thank
you for your clarification. I double-checked the header and I agree with you.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]