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/02/01 07:51:36 UTC

[GitHub] [tvm] masahi commented on a change in pull request #10122: [CUDA] Support float16 erf,tan,atan

masahi commented on a change in pull request #10122:
URL: https://github.com/apache/tvm/pull/10122#discussion_r796330322



##########
File path: src/target/source/literal/cuda_half_t.h
##########
@@ -320,19 +334,32 @@ __pack_nv_bfloat162(const nv_bfloat16 x, const nv_bfloat16 y) {
   return (v1 << 16) | v0;
 }
 
-// fix undefined fp16 match function
-static inline __device__ __host__ nv_bfloat16 hpow(nv_bfloat16 x, nv_bfloat16 y) {
-  float tmp_x = __bfloat162float(x);
-  float tmp_y = __bfloat162float(y);
-  float result = powf(tmp_x, tmp_y);
-  return __float2bfloat16(result);
+// Some bfp16 match functions are not supported in cuda_bfp16.h,
+// so we define them here to make sure the generated CUDA code

Review comment:
       math?
   




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