[PATCH] D100652: [HIP] Support hipRTC in header
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 16 07:59:02 PDT 2021
yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.
hipRTC compiles HIP device code at run time. Since the system may not
have development tools installed, when a HIP program is compiled through
hipRTC, there is no standard C or C++ header available. As such, the HIP
headers should not depend on standard C or C++ headers when used
with hipRTC. Basically when hipRTC is used, HIP headers only provides
definitions of HIP device API functions. This is in line with what nvRTC does.
This patch adds support of hipRTC to HIP headers in clang. Basically hipRTC
defines a macro __HIPCC_RTC__ when compile HIP code at run time. When
this macro is defined, HIP headers do not include standard C/C++ headers.
https://reviews.llvm.org/D100652
Files:
clang/lib/Headers/__clang_hip_cmath.h
clang/lib/Headers/__clang_hip_math.h
clang/lib/Headers/__clang_hip_runtime_wrapper.h
clang/test/Headers/hip-header.hip
clang/test/lit.cfg.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100652.338113.patch
Type: text/x-patch
Size: 4894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210416/3d96393f/attachment-0001.bin>
More information about the cfe-commits
mailing list