summaryrefslogtreecommitdiffstats
path: root/lib/Headers/__clang_cuda_device_functions.h
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Provide integer SIMD functions for CUDA-9.2Artem Belevich2018-07-201-0/+427
| | | | | | | | | | | | | | | | | | | | | CUDA-9.2 made all integer SIMD functions into compiler builtins, so clang no longer has access to the implementation of these functions in either headers of libdevice and has to provide its own implementation. This is mostly a 1:1 mapping to a corresponding PTX instructions with an exception of vhadd2/vhadd4 that don't have an equivalent instruction and had to be implemented with a bit hack. Performance of this implementation will be suboptimal for SM_50 and newer GPUs where PTXAS generates noticeably worse code for the SIMD instructions compared to the code it generates for the inline assembly generated by nvcc (or used to come with CUDA headers). Differential Revision: https://reviews.llvm.org/D49274 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337587 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Added missing functions.Artem Belevich2018-02-221-0/+22
| | | | | | | | | Initial commit missed sincos(float), llabs() and few atomics that we used to pull in from device_functions.hpp, which we no longer include. Differential Revision: https://reviews.llvm.org/D43602 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325814 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Added missing __threadfence_system() function for CUDA9.Artem Belevich2018-02-201-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325626 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Added partial support for CUDA-9.1Artem Belevich2018-01-301-0/+1318
Clang can use CUDA-9.1 now, though new APIs (are not implemented yet. The major change is that headers in CUDA-9.1 went through substantial changes that started in CUDA-9.0 which required substantial changes in the cuda compatibility headers provided by clang. There are two major issues: * CUDA SDK no longer provides declarations for libdevice functions. * A lot of device-side functions have become nvcc's builtins and CUDA headers no longer contain their implementations. This patch changes the way CUDA headers are handled if we compile with CUDA 9.x. Both 9.0 and 9.1 are affected. * Clang provides its own declarations of libdevice functions. * For CUDA-9.x clang now provides implementation of device-side 'standard library' functions using libdevice. This patch should not affect compilation with CUDA-8. There may be some observable differences for CUDA-9.0, though they are not expected to affect functionality. Tested: CUDA test-suite tests for all supported combinations of: CUDA: 7.0,7.5,8.0,9.0,9.1 GPU: sm_20, sm_35, sm_60, sm_70 Differential Revision: https://reviews.llvm.org/D42513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323713 91177308-0d34-0410-b5e6-96231b3b80d8