Skip to content

Commit 3b92e83

Browse files
authored
[CUDA] Do not include obsolete texture_fetch_functions.h (#151766)
1 parent 4d1ae58 commit 3b92e83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Headers/__clang_cuda_runtime_wrapper.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,12 @@ __host__ __device__ void __nv_tex_surf_handler(const char *name, T *ptr,
385385
#endif // CUDA_VERSION
386386
#endif // __cplusplus >= 201103L && CUDA_VERSION >= 9000
387387
#include "surface_indirect_functions.h"
388+
#if CUDA_VERSION < 13000
389+
// Direct texture fetch functions had been deprecated since CUDA-11.
390+
// The file in CUDA-12 only carried unused texture types, and is no longer
391+
// needed.
388392
#include "texture_fetch_functions.h"
393+
#endif // CUDA_VERSION < 13000
389394
#include "texture_indirect_functions.h"
390395

391396
// Restore state of __CUDA_ARCH__ and __THROW we had on entry.

0 commit comments

Comments
 (0)