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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]