This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Remove implementations of nexttoward and nextafter.
AbandonedPublic

Authored by jlebar on Nov 6 2017, 3:06 PM.

Details

Reviewers
tra
Summary

__builtin_nexttoward &co lower to a libcall, e.g. nexttowardf(), that
CUDA does not have.

Rather than try to implement it, we simply remove these calls -- nvcc
doesn't support them either.

Event Timeline

jlebar created this revision.Nov 6 2017, 3:06 PM
tra edited edge metadata.Nov 6 2017, 3:18 PM

Libdevice does provide implementation for __nv_nextafterf() and __nv_nextafter() and it has corresponding wrappers in math_functions.h[pp].

Perhaps we should keep nextafter around.

jlebar added a comment.Nov 8 2017, 3:18 PM

Libdevice does provide implementation for nv_nextafterf() and nv_nextafter() and it has corresponding wrappers in math_functions.h[pp].

Perhaps we should keep nextafter around.

Oh, that changes things, since nexttoward is basically the same thing as nextafter. Thanks.

Let's scrap this and try again.