diff --git a/clang/test/dpct/user_cuda_file/cuda.h b/clang/test/dpct/user_cuda_file/cuda.h new file mode 100644 index 000000000000..fae2307a6e92 --- /dev/null +++ b/clang/test/dpct/user_cuda_file/cuda.h @@ -0,0 +1,7 @@ +#ifndef __MY_CUDA_H__ +#define __MY_CUDA_H__ + +// CHECK: sycl::float3 f3; +float3 f3; + +#endif // __MY_CUDA_H__ diff --git a/clang/test/dpct/user_cuda_file/test.cu b/clang/test/dpct/user_cuda_file/test.cu new file mode 100644 index 000000000000..ba7f7e65b5fb --- /dev/null +++ b/clang/test/dpct/user_cuda_file/test.cu @@ -0,0 +1,12 @@ +// RUN: dpct --out-root %T %s --cuda-include-path="%cuda-path/include" +// RUN: FileCheck %s --match-full-lines --input-file %T/test.dp.cpp +// RUN: FileCheck %S/cuda.h --match-full-lines --input-file %T/cuda.h +// RUN: %if build_lit %{icpx -c -fsycl %T/test.dp.cpp -o %T/test.dp.o %} + +#include "cuda.h" + +int main() { + // CHECK: sycl::float2 f2; + float2 f2; + return 0; +}