mhyang-pllab opened a new pull request, #11488: URL: https://github.com/apache/tvm/pull/11488
Consider the SelectNode comes from the test_opencl_ternary_expression test: ``` true_value false_value cond int8 int8 bool ``` It's was generating the **[OpenCL select function](https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/select.html)** from the node. The problem is that [the function signatures are strict](https://github.com/llvm/llvm-project/blob/3606da5fbad042e2b74a35404797af20f65b437b/clang/lib/Headers/opencl-c.h#L11034) and would make it **generate ambiguous calls** with the case already in the testsuite. According to **[OCL spec 6.3.9. Ternary Selection Operator](https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_C.html#operators-ternary-selection)**, the ternary selection operator is **equivalent to calling with select** but without the difficulty of casting the operands to avoid ambiguous cases. With this patch, the mentioned test passed. The generated kernels are still equivalent. Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread. -- 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]
