This is an archive of the discontinued LLVM Phabricator instance.

[HIP] cmath demote long double args to double
ClosedPublic

Authored by ashi1 on Nov 25 2020, 1:12 PM.

Details

Summary

Since there is no ROCm Device Library support for
long double, demote them to double, and use the fp64
math functions.

Diff Detail

Event Timeline

ashi1 requested review of this revision.Nov 25 2020, 1:12 PM
ashi1 created this revision.
ashi1 added a comment.Nov 25 2020, 1:14 PM

There are applications calling functions such as fmod(long double x, long double y), but this produces a "call is ambiguous" error.

tra added a comment.Nov 30 2020, 12:34 PM

LGTM in general. Will defer to Sam as it's HIP.

Nit:

long double, promote them to double, and use the fp64

I'd say long double -> double qualifies as a demotion.

yaxunl accepted this revision.Dec 3 2020, 2:26 PM

LGTM. Thanks.

This revision is now accepted and ready to land.Dec 3 2020, 2:26 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2020, 3:01 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ashi1 added a comment.Dec 3 2020, 3:01 PM
In D92130#2423801, @tra wrote:

LGTM in general. Will defer to Sam as it's HIP.

Nit:

long double, promote them to double, and use the fp64

I'd say long double -> double qualifies as a demotion.

Thanks, I've changed the commit description to demote.

ashi1 retitled this revision from [HIP] cmath promote long double args to double to [HIP] cmath demote long double args to double.Dec 3 2020, 3:01 PM
ashi1 edited the summary of this revision. (Show Details)