[all-commits] [llvm/llvm-project] c0f0d5: [HIP] emit macro `__HIP_NO_IMAGE_SUPPORT`
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Wed Jun 14 19:54:36 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c0f0d50653e16145beee474a3d0d602596502dde
https://github.com/llvm/llvm-project/commit/c0f0d50653e16145beee474a3d0d602596502dde
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2023-06-14 (Wed, 14 Jun 2023)
Changed paths:
M clang/include/clang/Basic/DiagnosticFrontendKinds.td
M clang/include/clang/Basic/TargetInfo.h
M clang/lib/Basic/TargetInfo.cpp
M clang/lib/Basic/Targets/AMDGPU.cpp
M clang/lib/Basic/Targets/AMDGPU.h
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Frontend/InitPreprocessor.cpp
M clang/test/Driver/hip-macros.hip
M llvm/lib/TargetParser/TargetParser.cpp
Log Message:
-----------
[HIP] emit macro `__HIP_NO_IMAGE_SUPPORT`
HIP texture/image support is optional as some devices
do not have image instructions. A macro __HIP_NO_IMAGE_SUPPORT
is defined for device not supporting images (https://github.com/ROCm-Developer-Tools/HIP/blob/d0448aa4c4dd0f4b29ccf6a663b7f5ad9f5183e0/docs/reference/kernel_language.md?plain=1#L426 )
Currently the macro is defined by HIP header based on predefined macros
for GPU, e.g __gfx*__ , which is error prone. This patch let clang
emit the predefined macro.
Reviewed by: Matt Arsenault, Artem Belevich
Differential Revision: https://reviews.llvm.org/D151349
More information about the All-commits
mailing list