未验证 提交 f7bfe5e7 编写于 作者: B Bhavya Medishetty 提交者: GitHub

[ROCm] temporary workaround till __double2half support enabled in HIP (#3236)

* temporary WAR workaround till __double2half support enabled in HIP

* workaround only for hipcc

---------
Co-authored-by: NLogan Adams <114770087+loadams@users.noreply.github.com>
上级 bcccee4d
......@@ -266,7 +266,12 @@ DS_D_INLINE float2 to(__nv_bfloat162 val)
template <>
DS_D_INLINE __half to(double val)
{
#ifdef __HIP_PLATFORM_HCC__
float val_f = __double2float_rn(val);
return __float2half(val_f);
#else
return __double2half(val);
#endif
}
template <>
DS_D_INLINE __half to(float val)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册