[PATCH] D99949: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed
Jon Chesterfield via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 22 15:32:26 PDT 2021
JonChesterfield added a comment.
In D99949#2710273 <https://reviews.llvm.org/D99949#2710273>, @davezarzycki wrote:
> I removed all HSA/ROCM via the package manager and everything is fine now. Have you considered using __has_include() instead of CMake? It seems to be supported by all contemporary compilers, even MSVC.
To confirm, you can build the pre-revert version of this patch after that adjustment? If so I'll give this another try.
I have indeed considered something along the lines of
#if __has_include
#if __has_include("hsa.h")
#include "hsa.h"
#elif __has_include("hsa/hsa.h")
#include "hsa/hsa.h"
#endif
#else
#include "hsa.h"
#endif
It's tempting to forward declare the few pieces used instead. Hopefully the cmake find_package stuff will be robust enough to avoid such things.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99949/new/
https://reviews.llvm.org/D99949
More information about the cfe-commits
mailing list