From a0758d60e06ba003b0838fe74bfe9b935b201f7b Mon Sep 17 00:00:00 2001 From: zhiweij1 Date: Wed, 16 Nov 2022 10:20:14 +0800 Subject: [PATCH] [SYCLomatic] Migrate cublasHandle_t to dpct::queue_ptr (#354) Signed-off-by: Jiang, Zhiwei --- clang/lib/DPCT/ASTTraversal.cpp | 18 ++--- clang/lib/DPCT/MapNames.cpp | 3 +- .../test/dpct/cublas-create-Sgemm-destroy.cu | 11 +++- clang/test/dpct/cublasLegacyHelper.cu | 2 +- clang/test/dpct/cublasReturnType.cu | 2 +- clang/test/dpct/datatypes_test_part2.cu | 66 +++++++++---------- clang/test/dpct/nestedqueue.cu | 8 +-- .../test_api_level/BlasUtils/api_test1.cu | 2 +- .../test_api_level/BlasUtils/api_test10.cu | 2 +- .../test_api_level/BlasUtils/api_test11.cu | 2 +- .../test_api_level/BlasUtils/api_test12.cu | 2 +- .../test_api_level/BlasUtils/api_test13.cu | 2 +- .../test_api_level/BlasUtils/api_test14.cu | 2 +- .../test_api_level/BlasUtils/api_test15.cu | 2 +- .../test_api_level/BlasUtils/api_test16.cu | 2 +- .../test_api_level/BlasUtils/api_test17.cu | 2 +- .../test_api_level/BlasUtils/api_test18.cu | 2 +- .../test_api_level/BlasUtils/api_test19.cu | 2 +- .../test_api_level/BlasUtils/api_test20.cu | 2 +- .../test_api_level/BlasUtils/api_test21.cu | 2 +- .../test_api_level/BlasUtils/api_test22.cu | 2 +- .../test_api_level/BlasUtils/api_test23.cu | 2 +- .../test_api_level/BlasUtils/api_test24.cu | 2 +- .../test_api_level/BlasUtils/api_test25.cu | 2 +- .../test_api_level/BlasUtils/api_test26.cu | 2 +- .../test_api_level/BlasUtils/api_test27.cu | 2 +- .../test_api_level/BlasUtils/api_test28.cu | 2 +- .../test_api_level/BlasUtils/api_test29.cu | 2 +- .../test_api_level/BlasUtils/api_test3.cu | 2 +- .../test_api_level/BlasUtils/api_test30.cu | 2 +- .../test_api_level/BlasUtils/api_test31.cu | 2 +- .../test_api_level/BlasUtils/api_test32.cu | 2 +- .../test_api_level/BlasUtils/api_test33.cu | 2 +- .../test_api_level/BlasUtils/api_test4.cu | 2 +- .../test_api_level/BlasUtils/api_test5.cu | 2 +- .../test_api_level/BlasUtils/api_test6.cu | 2 +- .../test_api_level/BlasUtils/api_test7.cu | 2 +- .../test_api_level/BlasUtils/api_test8.cu | 2 +- .../test_api_level/BlasUtils/api_test9.cu | 2 +- .../dpct/test_api_level/Memory/api_test13.cu | 2 +- .../dpct/test_api_level/Util/api_test11.cu | 2 +- .../test_helpapi_stats_with_replacetext.cu | 2 +- ..._helpapi_stats_with_replacetext_windows.cu | 2 +- clang/test/dpct/types001.cu | 4 +- 44 files changed, 97 insertions(+), 89 deletions(-) diff --git a/clang/lib/DPCT/ASTTraversal.cpp b/clang/lib/DPCT/ASTTraversal.cpp index 20ef46bdee3e..e30804e4b709 100644 --- a/clang/lib/DPCT/ASTTraversal.cpp +++ b/clang/lib/DPCT/ASTTraversal.cpp @@ -2445,7 +2445,7 @@ void TypeInDeclRule::registerMatcher(MatchFinder &MF) { "cudaError", "curandStatus", "cublasStatus", "CUstream", "CUstream_st", "thrust::complex", "thrust::device_vector", "thrust::device_ptr", "thrust::device_reference", - "thrust::host_vector", "cublasHandle_t", + "thrust::host_vector", "cublasHandle_t", "CUevent_st", "__half", "half", "__half2", "half2", "cudaMemoryAdvise", "cudaError_enum", "cudaDeviceProp", "cudaPitchedPtr", "thrust::counting_iterator", @@ -3238,11 +3238,11 @@ void TypeInDeclRule::runRule(const MatchFinder::MatchResult &Result) { const FunctionDecl *FD = DpctGlobalInfo::findAncestor(TL); if (FD && (FD->hasAttr() || FD->hasAttr())) { - if (TL->getType().getAsString().find("cublasHandle_t") != - std::string::npos) + if (DpctGlobalInfo::getUnqualifiedTypeName(TL->getType()) == "cublasHandle_t") { report(BeginLoc, Diagnostics::HANDLE_IN_DEVICE, false, TypeStr); + return; + } } - if (VarD) { DD = VarD; } else if (FieldD) { @@ -11684,7 +11684,7 @@ void MemoryMigrationRule::registerMatcher(MatchFinder &MF) { "cuMemcpyDtoD_v2", "cuMemAllocPitch_v2", "cuMemPrefetchAsync", "cuMemFree_v2", "cuDeviceTotalMem_v2", "cuMemHostGetFlags", "cuMemHostRegister_v2", "cuMemHostUnregister", - "cuMemcpy", "cuMemcpyAsync"); + "cuMemcpy", "cuMemcpyAsync"); }; MF.addMatcher(callExpr(allOf(callee(functionDecl(memoryAPI())), parentStmt())) @@ -11772,8 +11772,8 @@ void MemoryMigrationRule::runRule(const MatchFinder::MatchResult &Result) { Name.compare("cuMemHostRegister_v2") && Name.compare("cudaHostGetFlags") && Name.compare("cuMemHostGetFlags") && - Name.compare("cuMemcpy") && - Name.compare("cuMemcpyAsync")) { + Name.compare("cuMemcpy") && + Name.compare("cuMemcpyAsync")) { report(C->getBeginLoc(), Diagnostics::NOERROR_RETURN_COMMA_OP, false); insertAroundStmt(C, "(", ", 0)"); } else if (IsAssigned && !Name.compare("cudaMemAdvise") && @@ -11911,8 +11911,8 @@ MemoryMigrationRule::MemoryMigrationRule() { {"cuMemGetInfo_v2", &MemoryMigrationRule::miscMigration}, {"cudaMemGetInfo", &MemoryMigrationRule::miscMigration}, {"cuDeviceTotalMem_v2", &MemoryMigrationRule::miscMigration}, - {"cuMemcpy", &MemoryMigrationRule::memcpyMigration}, - {"cuMemcpyAsync", &MemoryMigrationRule::memcpyMigration}}; + {"cuMemcpy", &MemoryMigrationRule::memcpyMigration}, + {"cuMemcpyAsync", &MemoryMigrationRule::memcpyMigration}}; for (auto &P : Dispatcher) MigrationDispatcher[P.first] = diff --git a/clang/lib/DPCT/MapNames.cpp b/clang/lib/DPCT/MapNames.cpp index 01d411ba796d..94d62e1d4322 100644 --- a/clang/lib/DPCT/MapNames.cpp +++ b/clang/lib/DPCT/MapNames.cpp @@ -182,7 +182,8 @@ void MapNames::setExplicitNamespaceMap() { {"ushort3", std::make_shared(getClNamespace() + "ushort3")}, {"ushort4", std::make_shared(getClNamespace() + "ushort4")}, {"cublasHandle_t", - std::make_shared(getClNamespace() + "queue*")}, + std::make_shared(getDpctNamespace() + "queue_ptr", + HelperFeatureEnum::Device_typedef_queue_ptr)}, {"cublasStatus_t", std::make_shared("int")}, {"cublasStatus", std::make_shared("int")}, {"cublasGemmAlgo_t", std::make_shared("int")}, diff --git a/clang/test/dpct/cublas-create-Sgemm-destroy.cu b/clang/test/dpct/cublas-create-Sgemm-destroy.cu index a8005f5328bb..7cef8ce00696 100644 --- a/clang/test/dpct/cublas-create-Sgemm-destroy.cu +++ b/clang/test/dpct/cublas-create-Sgemm-destroy.cu @@ -15,7 +15,7 @@ cublasStatus_t bar (cublasStatus_t s){ return s; } -// CHECK: extern sycl::queue* handle2; +// CHECK: extern dpct::queue_ptr handle2; extern cublasHandle_t handle2; // CHECK: int foo2(dpct::library_data_t DT) try { @@ -23,7 +23,7 @@ int foo2(cudaDataType DT) { // CHECK: dpct::device_ext &dev_ct1 = dpct::get_current_device(); // CHECK-NEXT: sycl::queue &q_ct1 = dev_ct1.default_queue(); // CHECK: int status; - // CHECK-NEXT: sycl::queue* handle; + // CHECK-NEXT: dpct::queue_ptr handle; // CHECK-NEXT: handle = &q_ct1; // CHECK-NEXT: /* // CHECK-NEXT: DPCT1003:{{[0-9]+}}: Migrated API does not return error code. (*, 0) is inserted. You may need to rewrite this code. @@ -294,3 +294,10 @@ void foo4() { cublasCdgmm(handle, CUBLAS_SIDE_LEFT, 2, 2, a_c, 2, x_c, 1, c_c, 2); cublasZdgmm(handle, CUBLAS_SIDE_LEFT, 2, 2, a_z, 2, x_z, 1, c_z, 2); } + +void foo() { + //CHECK:const dpct::queue_ptr h_c = nullptr; + //CHECK-NEXT:dpct::queue_ptr h = h_c; + const cublasHandle_t h_c = nullptr; + cublasHandle_t h = h_c; +} diff --git a/clang/test/dpct/cublasLegacyHelper.cu b/clang/test/dpct/cublasLegacyHelper.cu index 3f0bcd60f596..3c9c359ff505 100644 --- a/clang/test/dpct/cublasLegacyHelper.cu +++ b/clang/test/dpct/cublasLegacyHelper.cu @@ -74,7 +74,7 @@ int main() { // CHECK: int a = sizeof(int); // CHECK-NEXT: a = sizeof(int); - // CHECK-NEXT: a = sizeof(cl::sycl::queue*); + // CHECK-NEXT: a = sizeof(dpct::queue_ptr); // CHECK-NEXT: a = sizeof(cl::sycl::float2); // CHECK-NEXT: a = sizeof(cl::sycl::double2); int a = sizeof(cublasStatus); diff --git a/clang/test/dpct/cublasReturnType.cu b/clang/test/dpct/cublasReturnType.cu index 26e51ee6aaab..6f2e2ef6c424 100644 --- a/clang/test/dpct/cublasReturnType.cu +++ b/clang/test/dpct/cublasReturnType.cu @@ -10,7 +10,7 @@ cublasStatus_t foo(int m, int n) { return CUBLAS_STATUS_SUCCESS; } -// CHECK: sycl::queue* foo1(int m) { +// CHECK: dpct::queue_ptr foo1(int m) { cublasHandle_t foo1(int m) { return 0; } diff --git a/clang/test/dpct/datatypes_test_part2.cu b/clang/test/dpct/datatypes_test_part2.cu index 99b2e70c700f..59ed3cd1b4a6 100644 --- a/clang/test/dpct/datatypes_test_part2.cu +++ b/clang/test/dpct/datatypes_test_part2.cu @@ -66,10 +66,10 @@ cudaEvent_t &&var4 = std::move(var1); } { -// CHECK: sycl::queue* var1; -// CHECK-NEXT: sycl::queue* *var2; -// CHECK-NEXT: sycl::queue* &var3 = var1; -// CHECK-NEXT: sycl::queue* &&var4 = std::move(var1); +// CHECK: dpct::queue_ptr var1; +// CHECK-NEXT: dpct::queue_ptr *var2; +// CHECK-NEXT: dpct::queue_ptr &var3 = var1; +// CHECK-NEXT: dpct::queue_ptr &&var4 = std::move(var1); cublasHandle_t var1; cublasHandle_t *var2; cublasHandle_t &var3 = var1; @@ -274,8 +274,8 @@ void case_2(void) { } { -// CHECK: new sycl::queue*(); -// CHECK-NEXT: new sycl::queue* *(); +// CHECK: new dpct::queue_ptr(); +// CHECK-NEXT: new dpct::queue_ptr *(); new cublasHandle_t(); new cublasHandle_t *(); } @@ -420,9 +420,9 @@ cudaEvent_t foo12(); cudaEvent_t *foo13(); cudaEvent_t &foo14(); -// CHECK: sycl::queue* foo15(); -// CHECK-NEXT: sycl::queue* *foo16(); -// CHECK-NEXT: sycl::queue* &foo17(); +// CHECK: dpct::queue_ptr foo15(); +// CHECK-NEXT: dpct::queue_ptr *foo16(); +// CHECK-NEXT: dpct::queue_ptr &foo17(); cublasHandle_t foo15(); cublasHandle_t *foo16(); cublasHandle_t &foo17(); @@ -570,10 +570,10 @@ template <> struct S {}; template <> struct S {}; template <> struct S {}; -// CHECK: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; -// CHECK-NEXT: template <> struct S {}; +// CHECK: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; +// CHECK-NEXT: template <> struct S {}; template <> struct S {}; template <> struct S {}; template <> struct S {}; @@ -747,10 +747,10 @@ template_foo(); template_foo(); template_foo(); -// CHECK: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); -// CHECK-NEXT: template_foo(); +// CHECK: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); +// CHECK-NEXT: template_foo(); template_foo(); template_foo(); template_foo(); @@ -940,10 +940,10 @@ using UT17 = cudaEvent_t *; using UT18 = cudaEvent_t &; using UT19 = cudaEvent_t &&; -// CHECK: using UT20 = sycl::queue*; -// CHECK-NEXT: using UT21 = sycl::queue* *; -// CHECK-NEXT: using UT22 = sycl::queue* &; -// CHECK-NEXT: using UT23 = sycl::queue* &&; +// CHECK: using UT20 = dpct::queue_ptr; +// CHECK-NEXT: using UT21 = dpct::queue_ptr *; +// CHECK-NEXT: using UT22 = dpct::queue_ptr &; +// CHECK-NEXT: using UT23 = dpct::queue_ptr &&; using UT20 = cublasHandle_t; using UT21 = cublasHandle_t *; using UT22 = cublasHandle_t &; @@ -1132,10 +1132,10 @@ typedef cudaEvent_t* T17; typedef cudaEvent_t& T18; typedef cudaEvent_t&& T19; -// CHECK: typedef sycl::queue* T20; -// CHECK-NEXT: typedef sycl::queue** T21; -// CHECK-NEXT: typedef sycl::queue*& T22; -// CHECK-NEXT: typedef sycl::queue*&& T23; +// CHECK: typedef dpct::queue_ptr T20; +// CHECK-NEXT: typedef dpct::queue_ptr* T21; +// CHECK-NEXT: typedef dpct::queue_ptr& T22; +// CHECK-NEXT: typedef dpct::queue_ptr&& T23; typedef cublasHandle_t T20; typedef cublasHandle_t* T21; typedef cublasHandle_t& T22; @@ -1384,19 +1384,19 @@ __device__ void foo_t(){ // CHECK: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ -// CHECK-NEXT: #define T8_20 sycl::queue* +// CHECK-NEXT: #define T8_20 cublasHandle_t // CHECK-NEXT: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ -// CHECK-NEXT: #define T8_21 sycl::queue* * +// CHECK-NEXT: #define T8_21 cublasHandle_t * // CHECK-NEXT: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ -// CHECK-NEXT: #define T8_22 sycl::queue* & +// CHECK-NEXT: #define T8_22 cublasHandle_t & // CHECK-NEXT: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ -// CHECK-NEXT: #define T8_23 sycl::queue* && +// CHECK-NEXT: #define T8_23 cublasHandle_t && // CHECK-NEXT: T8_20 a1; // CHECK-NEXT: T8_21 a2; // CHECK-NEXT: T8_22 a3=a1; @@ -1744,10 +1744,10 @@ template <> void foo2(cudaEvent_t){} template <> void foo3(cudaEvent_t){} template <> void foo4(cudaEvent_t){} -// CHECK: template <> void foo1(sycl::queue*){} -// CHECK-NEXT: template <> void foo2(sycl::queue*){} -// CHECK-NEXT: template <> void foo3(sycl::queue*){} -// CHECK-NEXT: template <> void foo4(sycl::queue*){} +// CHECK: template <> void foo1(dpct::queue_ptr){} +// CHECK-NEXT: template <> void foo2(dpct::queue_ptr){} +// CHECK-NEXT: template <> void foo3(dpct::queue_ptr){} +// CHECK-NEXT: template <> void foo4(dpct::queue_ptr){} template <> void foo1(cublasHandle_t){} template <> void foo2(cublasHandle_t){} template <> void foo3(cublasHandle_t){} diff --git a/clang/test/dpct/nestedqueue.cu b/clang/test/dpct/nestedqueue.cu index 7c040bbc8f6a..dd4445d9bf0d 100644 --- a/clang/test/dpct/nestedqueue.cu +++ b/clang/test/dpct/nestedqueue.cu @@ -9,7 +9,7 @@ __host__ __device__ void foo1(){ // CHECK: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ - // CHECK-NEXT: sycl::queue* handle; + // CHECK-NEXT: cublasHandle_t handle; cublasHandle_t handle; int n=1; float* x_S=0; @@ -26,7 +26,7 @@ __device__ void foo2(){ // CHECK: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ - // CHECK-NEXT: sycl::queue* handle; + // CHECK-NEXT: cublasHandle_t handle; cublasHandle_t handle; int n=1; float* x_S=0; @@ -43,7 +43,7 @@ __global__ void foo3(){ // CHECK: /* // CHECK-NEXT: DPCT1021:{{[0-9]+}}: Migration of cublasHandle_t in __global__ or __device__ function is not supported. You may need to redesign the code. // CHECK-NEXT: */ - // CHECK-NEXT: sycl::queue* handle; + // CHECK-NEXT: cublasHandle_t handle; cublasHandle_t handle; int n=1; float* x_S=0; @@ -57,7 +57,7 @@ __global__ void foo3(){ } __host__ void foo4(){ - // CHECK: sycl::queue* handle; + // CHECK: dpct::queue_ptr handle; cublasHandle_t handle; int n=1; float* x_S=0; diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test1.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test1.cu index 4602025c7640..6296e6d9f73b 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test1.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test1.cu @@ -4,7 +4,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test1_out/api_test1.dp.cpp --match-full-lines %s -check-prefix=CODE // RUN: rm -rf %T/BlasUtils/api_test1_out -// FEATURE_NUMBER: 22 +// FEATURE_NUMBER: 23 // CODE: // AAA // CODE-NEXT:#include diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test10.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test10.cu index f1c0181865a1..b5a9e859ead6 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test10.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test10.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test10_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test10_out -// CHECK: 36 +// CHECK: 37 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test11.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test11.cu index 5e2dd3a97978..92f23c2bf3ab 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test11.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test11.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test11_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test11_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test12.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test12.cu index 309c5fbefa8a..5db9cf430cb1 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test12.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test12.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test12_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test12_out -// CHECK: 17 +// CHECK: 18 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test13.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test13.cu index 1290bc4365c9..a7c0e0fe6f72 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test13.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test13.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test13_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test13_out -// CHECK: 17 +// CHECK: 18 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test14.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test14.cu index b1dafde3680a..61096346f027 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test14.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test14.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test14_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test14_out -// CHECK: 31 +// CHECK: 32 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test15.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test15.cu index 5792ed586967..055673ac2377 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test15.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test15.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test15_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test15_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test16.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test16.cu index c67eda97eeed..caf1024603d5 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test16.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test16.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test16_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test16_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test17.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test17.cu index 7f4eadbe10cd..e695bc8d49bd 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test17.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test17.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test17_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test17_out -// CHECK: 38 +// CHECK: 39 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test18.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test18.cu index c39e8573739e..7d4d393f5388 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test18.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test18.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test18_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test18_out -// CHECK: 16 +// CHECK: 17 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test19.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test19.cu index fbab28fba783..be6cfcaa2eb3 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test19.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test19.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test19_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test19_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test20.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test20.cu index a182118c4ad3..c7dd9f80817c 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test20.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test20.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test20_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test20_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test21.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test21.cu index 0be5d4e4b597..01fedcd81422 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test21.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test21.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test21_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test21_out -// CHECK: 38 +// CHECK: 39 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test22.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test22.cu index 398d56806680..85b6068066f3 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test22.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test22.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test22_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test22_out -// CHECK: 14 +// CHECK: 15 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test23.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test23.cu index ee4c63e90e87..e943dd92a05c 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test23.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test23.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test23_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test23_out -// CHECK: 27 +// CHECK: 28 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test24.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test24.cu index 75ed01e1f533..ac88b3077d72 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test24.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test24.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test24_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test24_out -// CHECK: 27 +// CHECK: 28 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test25.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test25.cu index 8bc5d54a8e43..7732c45efd72 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test25.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test25.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test25_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test25_out -// CHECK: 13 +// CHECK: 14 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test26.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test26.cu index 790ea21503a9..567d3b79089d 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test26.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test26.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test26_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test26_out -// CHECK: 14 +// CHECK: 15 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test27.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test27.cu index 390ceca39fd4..81db293ff09f 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test27.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test27.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test27_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test27_out -// CHECK: 14 +// CHECK: 15 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test28.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test28.cu index aee3af4e5e55..7a4bb3c88b4f 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test28.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test28.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test28_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test28_out -// CHECK: 31 +// CHECK: 32 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test29.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test29.cu index f37d4c08dcdf..97c82d1dedc8 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test29.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test29.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test29_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test29_out -// CHECK: 26 +// CHECK: 27 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test3.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test3.cu index b9219e58827f..2ab34366b6d7 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test3.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test3.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test3_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test3_out -// CHECK: 8 +// CHECK: 9 // TEST_FEATURE: BlasUtils_get_value diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test30.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test30.cu index fde9f153d597..f60ece8a67e5 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test30.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test30.cu @@ -5,7 +5,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test30_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test30_out -// CHECK: 14 +// CHECK: 15 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test31.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test31.cu index 670143668eb5..534d2c1d64d6 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test31.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test31.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test31_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test31_out -// CHECK: 14 +// CHECK: 15 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test32.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test32.cu index bf69a8ea5226..e2aa8c35f19c 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test32.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test32.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test32_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test32_out -// CHECK: 13 +// CHECK: 14 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test33.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test33.cu index 2c2bb2f1089a..efa09b29c51a 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test33.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test33.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test33_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test33_out -// CHECK: 31 +// CHECK: 32 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test4.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test4.cu index cb638107a701..e75abb3b8cb8 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test4.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test4.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test4_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test4_out -// CHECK: 39 +// CHECK: 40 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test5.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test5.cu index e4fa3f4c41f1..4af54c8b8fb4 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test5.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test5.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test5_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test5_out -// CHECK: 33 +// CHECK: 34 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test6.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test6.cu index d33fd156a43e..09b92be10556 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test6.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test6.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test6_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test6_out -// CHECK: 37 +// CHECK: 38 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test7.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test7.cu index 360e9f5a1743..e6633d5612c9 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test7.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test7.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test7_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test7_out -// CHECK: 23 +// CHECK: 24 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test8.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test8.cu index 5b6f44b5aacb..8b3fe8812f8e 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test8.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test8.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test8_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test8_out -// CHECK: 44 +// CHECK: 45 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/BlasUtils/api_test9.cu b/clang/test/dpct/test_api_level/BlasUtils/api_test9.cu index ad841593f10e..c98bfa21eb3c 100644 --- a/clang/test/dpct/test_api_level/BlasUtils/api_test9.cu +++ b/clang/test/dpct/test_api_level/BlasUtils/api_test9.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/BlasUtils/api_test9_out/count.txt --match-full-lines %s // RUN: rm -rf %T/BlasUtils/api_test9_out -// CHECK: 35 +// CHECK: 36 #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/Memory/api_test13.cu b/clang/test/dpct/test_api_level/Memory/api_test13.cu index 5f4b1144b65e..f02a3baeff8b 100644 --- a/clang/test/dpct/test_api_level/Memory/api_test13.cu +++ b/clang/test/dpct/test_api_level/Memory/api_test13.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/Memory/api_test13_out/count.txt --match-full-lines %s // RUN: rm -rf %T/Memory/api_test13_out -// CHECK: 11 +// CHECK: 12 // TEST_FEATURE: Memory_is_device_ptr #include "cublas_v2.h" diff --git a/clang/test/dpct/test_api_level/Util/api_test11.cu b/clang/test/dpct/test_api_level/Util/api_test11.cu index bf8f8d20d3bb..7a76d3b2b6d6 100644 --- a/clang/test/dpct/test_api_level/Util/api_test11.cu +++ b/clang/test/dpct/test_api_level/Util/api_test11.cu @@ -3,7 +3,7 @@ // RUN: FileCheck --input-file %T/Util/api_test11_out/count.txt --match-full-lines %s // RUN: rm -rf %T/Util/api_test11_out -// CHECK: 31 +// CHECK: 32 // TEST_FEATURE: Util_matrix_mem_copy_T diff --git a/clang/test/dpct/test_helpapi_stats_with_replacetext.cu b/clang/test/dpct/test_helpapi_stats_with_replacetext.cu index 3b0bdee83254..de495c583381 100644 --- a/clang/test/dpct/test_helpapi_stats_with_replacetext.cu +++ b/clang/test/dpct/test_helpapi_stats_with_replacetext.cu @@ -3,7 +3,7 @@ // RUN: cd %T/test_helpapi_stats_with_replacetext // RUN: dpct --format-range=none -out-root %T/test_helpapi_stats_with_replacetext %s --cuda-include-path="%cuda-path/include" --report-type=stats -- -x cuda --cuda-host-only > stats.txt // RUN: echo "// `perl -e 'print "CH","ECK"'`: File name, LOC migrated to SYCL, LOC migrated to helper functions, LOC not needed to migrate, LOC not able to migrate" > %T/test_helpapi_stats_with_replacetext/test_helpapi_stats_with_replacetext_ref.txt -// RUN: echo "// `perl -e 'print "CH","ECK-NEXT"'`: {{(.+)}}/test_helpapi_stats_with_replacetext.cu, 14, 16, 47, 0" >> %T/test_helpapi_stats_with_replacetext/test_helpapi_stats_with_replacetext_ref.txt +// RUN: echo "// `perl -e 'print "CH","ECK-NEXT"'`: {{(.+)}}/test_helpapi_stats_with_replacetext.cu, 13, 17, 47, 0" >> %T/test_helpapi_stats_with_replacetext/test_helpapi_stats_with_replacetext_ref.txt // RUN: FileCheck --match-full-lines --input-file %T/test_helpapi_stats_with_replacetext/stats.txt %T/test_helpapi_stats_with_replacetext/test_helpapi_stats_with_replacetext_ref.txt // RUN: cd .. // RUN: rm -rf ./test_helpapi_stats_with_replacetext diff --git a/clang/test/dpct/test_helpapi_stats_with_replacetext_windows.cu b/clang/test/dpct/test_helpapi_stats_with_replacetext_windows.cu index 1a0926c8418d..91a2664a555e 100644 --- a/clang/test/dpct/test_helpapi_stats_with_replacetext_windows.cu +++ b/clang/test/dpct/test_helpapi_stats_with_replacetext_windows.cu @@ -3,7 +3,7 @@ // RUN: cd %T/test_helpapi_stats_with_replacetext_windows // RUN: dpct --format-range=none -out-root %T/test_helpapi_stats_with_replacetext_windows %s --cuda-include-path="%cuda-path/include" --report-type=stats -- -x cuda --cuda-host-only > stats.txt // RUN: echo "// CHECK: File name, LOC migrated to SYCL, LOC migrated to helper functions, LOC not needed to migrate, LOC not able to migrate" > %T/test_helpapi_stats_with_replacetext_windows/test_helpapi_stats_with_replacetext_ref.txt -// RUN: echo "// CHECK-NEXT: {{(.+)}}\test_helpapi_stats_with_replacetext_windows.cu, 14, 16, 47, 0" >> %T/test_helpapi_stats_with_replacetext_windows/test_helpapi_stats_with_replacetext_ref.txt +// RUN: echo "// CHECK-NEXT: {{(.+)}}\test_helpapi_stats_with_replacetext_windows.cu, 13, 17, 47, 0" >> %T/test_helpapi_stats_with_replacetext_windows/test_helpapi_stats_with_replacetext_ref.txt // RUN: FileCheck --match-full-lines --input-file %T/test_helpapi_stats_with_replacetext_windows/stats.txt %T/test_helpapi_stats_with_replacetext_windows/test_helpapi_stats_with_replacetext_ref.txt // RUN: cd .. // RUN: rm -rf ./test_helpapi_stats_with_replacetext_windows diff --git a/clang/test/dpct/types001.cu b/clang/test/dpct/types001.cu index 042010375888..05881961bb49 100644 --- a/clang/test/dpct/types001.cu +++ b/clang/test/dpct/types001.cu @@ -363,8 +363,8 @@ int main(int argc, char **argv) { a = sizeof(event_st); a = sizeof event_st; - //CHECK:sycl::queue *blashandle; - //CHECK-NEXT:a = sizeof(sycl::queue *); + //CHECK:dpct::queue_ptr blashandle; + //CHECK-NEXT:a = sizeof(dpct::queue_ptr); //CHECK-NEXT:a = sizeof(blashandle); //CHECK-NEXT:a = sizeof blashandle; cublasHandle_t blashandle;