New device library supporting v4 and v5 has abi_version_400.bc and abi
version_500.bc.
For v5, abi_version_500.bc is linked.
For v2-4, abi_version_400.bc is linked.
For old device library, for v2-4, none of the above is linked. For v5,
error is emitted about unsupported ABI version.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D118949
Fixes: SWDEV-321313
Add option -fgpu-sanitize to enable sanitizer for AMDGPU target.
Since it is experimental, it is off by default.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D96835
To support std::complex and some other standard C/C++ functions in HIP device code,
they need to be forced to be __host__ __device__ functions by pragmas. This is done
by some clang standard C++ wrapper headers which are shared between cuda-clang and hip-Clang.
For these standard C++ wapper headers to work properly, specific include path order
has to be enforced:
clang C++ wrapper include path
standard C++ include path
clang include path
Also, these C++ wrapper headers require device version of some standard C/C++ functions
must be declared before including them. This needs to be done by including a default
header which declares or defines these device functions. The default header is always
included before any other headers are included by users.
This patch adds the the default header and include path for HIP.
Differential Revision: https://reviews.llvm.org/D81176