Skip to content

Commit

Permalink
Fix runtime wrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Jiang, Zhiwei <[email protected]>
  • Loading branch information
zhiweij1 committed May 8, 2024
1 parent dd0caa8 commit 59bf0c1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions clang/lib/Headers/__clang_cuda_runtime_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,19 @@
// WARNING: Preprocessor hacks below are based on specific details of
// CUDA-7.x headers and are not expected to work with any other
// version of CUDA headers.
#include "cuda.h"
#ifdef SYCLomatic_CUSTOMIZATION
#if !defined(CUDA_VERSION)
#error "cuda.h did not define CUDA_VERSION"
#elif CUDA_VERSION < 7000
#error "Unsupported CUDA version!"
#endif
// In some projects, there is a header file also named cuda.h but with different
// content. To include the correct cuda.h, we try to use a folder name to
// distinguish those two cases.
#include "crt/../cuda.h"
#else
#include "cuda.h"
#endif // SYCLomatic_CUSTOMIZATION
#if !defined(CUDA_VERSION)
#error "cuda.h did not define CUDA_VERSION"
#elif CUDA_VERSION < 7000
#error "Unsupported CUDA version!"
#endif
#endif // SYCLomatic_CUSTOMIZATION

#if defined(SYCLomatic_CUSTOMIZATION) && CUDA_VERSION >= 10000
#pragma push_macro("__clang_major__")
Expand Down

0 comments on commit 59bf0c1

Please sign in to comment.