Page MenuHomePhabricator

[CUDA][NFC] Split math.h functions out of __clang_cuda_device_functions.h
ClosedPublic

Authored by jdoerfert on Apr 1 2020, 1:19 PM.

Details

Summary

This is not supported to change anything but allow us to reuse the math
functions separately from the device functions, e.g., source them at
different times. This will be used by the OpenMP overlay.

This also adds two return keywords that were missing.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 1 2020, 1:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 1:19 PM
tra accepted this revision.Apr 1 2020, 2:12 PM
This revision is now accepted and ready to land.Apr 1 2020, 2:12 PM
jdoerfert marked an inline comment as done.Apr 1 2020, 2:26 PM
jdoerfert added inline comments.
clang/lib/Headers/__clang_cuda_math.h
82

I accidentally moved the clock functions and added the openmp ifdef we'll need later. I'll move the clock functions back before I commit.

hliao added a subscriber: hliao.EditedApr 1 2020, 10:16 PM

this patch breaks the test clang/test/Headers/nvptx_device_cmath_functions.cpp, could you please fix it ASAP?
Once NVPTX target is enabled, the following tests failed:

Failing Tests (6):

Clang :: Headers/nvptx_device_cmath_functions.c
Clang :: Headers/nvptx_device_cmath_functions.cpp
Clang :: Headers/nvptx_device_cmath_functions_cxx17.cpp
Clang :: Headers/nvptx_device_math_functions.c
Clang :: Headers/nvptx_device_math_functions.cpp
Clang :: Headers/nvptx_device_math_functions_cxx17.cpp
This revision was automatically updated to reflect the committed changes.
jdoerfert added a comment.EditedApr 1 2020, 11:32 PM

this patch breaks the test clang/test/Headers/nvptx_device_cmath_functions.cpp, could you please fix it ASAP?
Once NVPTX target is enabled, the following tests failed:

Failing Tests (6):

Clang :: Headers/nvptx_device_cmath_functions.c
Clang :: Headers/nvptx_device_cmath_functions.cpp
Clang :: Headers/nvptx_device_cmath_functions_cxx17.cpp
Clang :: Headers/nvptx_device_math_functions.c
Clang :: Headers/nvptx_device_math_functions.cpp
Clang :: Headers/nvptx_device_math_functions_cxx17.cpp

Aware, should be fixed by b0b5f0416be60152ddc8d606b1720daba0005518. Apologies for the noise.