Yuan-Chuan-YUE opened a new pull request #8756:
URL: https://github.com/apache/tvm/pull/8756


   Hi! When I was testing erf function on opencl target, there is an error show 
as the follow image
   
![image](https://user-images.githubusercontent.com/69908243/129524959-c892824b-d08d-4401-90ee-3194f6ec647e.png)
   
   and the opencl codegen by tvm is:
   `__kernel void tvmgen_default_fused_erf_kernel0(__global float* restrict 
T_erf, __global float* restrict placeholder) {
     for (int ax0_ax1_fused_outer = 0; ax0_ax1_fused_outer < 3; 
++ax0_ax1_fused_outer) {
       if ((((ax0_ax1_fused_outer * 65536) + (((int)get_group_id(0)) * 256)) + 
((int)get_local_id(0))) < 132444) {
         T_erf[((((ax0_ax1_fused_outer * 65536) + (((int)get_group_id(0)) * 
256)) + ((int)get_local_id(0))))] = 
**erff**(placeholder[((((ax0_ax1_fused_outer * 65536) + (((int)get_group_id(0)) 
* 256)) + ((int)get_local_id(0))))]);
       }
     }
   }`
   
   So I add two lines in intrin_rule_opencl.cc to let tir.erf codegen to opencl 
directly instead of add suffix "f" as default which make erf become erff.


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


Reply via email to