Skip to content

Commit

Permalink
Add test
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 59bf0c1 commit 549538e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clang/test/dpct/user_cuda_file/cuda.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __MY_CUDA_H__
#define __MY_CUDA_H__

// CHECK: sycl::float3 f3;
float3 f3;

#endif // __MY_CUDA_H__
12 changes: 12 additions & 0 deletions clang/test/dpct/user_cuda_file/test.cu
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 549538e

Please sign in to comment.