<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61340>61340</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [CUDA 12] clang error: no template named 'texture'
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lahwaacz
      </td>
    </tr>
</table>

<pre>
    For a trivial `foo.cu`:
```cu
int main() {}
```

Running `clang++ foo.cu` results in:
```
clang-15: warning: CUDA version is newer than the latest supported version 11.5 [-Wunknown-cuda-version]
In file included from <built-in>:1:
In file included from /usr/lib/clang/15.0.7/include/__clang_cuda_runtime_wrapper.h:365:
/usr/lib/clang/15.0.7/include/__clang_cuda_texture_intrinsics.h:696:13: error: no template named 'texture'
            texture<__DataT, __TexT, cudaReadModeNormalizedFloat> __handle,
 ^
/usr/lib/clang/15.0.7/include/__clang_cuda_texture_intrinsics.h:709:13: error: no template named 'texture'
            texture<__DataT, __TexT, cudaReadModeElementType> __handle,
            ^
2 errors generated when compiling for sm_35.
```

The platform is Arch Linux:
```
$ clang++ --version
clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
```
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Feb__7_19:32:13_PST_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VVuP4yYU_jXkBdky4Ev8kIdcxtJK7aqapttHhM1JTIvBApxk9tdXOLfR7G5VVWqt0YTL4TvfOZzvILxXRwOwQsUGFbuFmEJv3UqL_ixE93XRWvm2aqzDAgenTkpojMrsYG3aTajMEFujbIeydRzPf910XVAm4EEog-gS0RqjaoOq3Qfb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