Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions csrc/includes/conversion_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down