comaniac commented on a change in pull request #10122:
URL: https://github.com/apache/tvm/pull/10122#discussion_r796358421
##########
File path: src/target/source/literal/cuda_half_t.h
##########
@@ -294,20 +294,34 @@ __pack_half2(const half x, const half y) {
return (v1 << 16) | v0;
}
-// fix undefined fp16 match function
+// Some fp16 match functions are not supported in cuda_fp16.h,
Review comment:
```suggestion
// Some fp16 math functions are not supported in cuda_fp16.h,
```
##########
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,
Review comment:
```suggestion
// Some bfp16 math functions are not supported in cuda_bfp16.h,
```
--
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]