Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCLomatic] Support query mapping with older version header on windows. #1975

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clang/lib/DPCT/DPCT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,12 @@ int runDPCT(int argc, const char **argv) {
}

Tool.appendArgumentsAdjuster(getInsertArgumentAdjuster("-w"));
#ifdef _WIN32 // Avoid some error on windows platform.
if (DpctGlobalInfo::getSDKVersion() <= CudaVersion::CUDA_100) {
Tool.appendArgumentsAdjuster(
getInsertArgumentAdjuster("-D_MSC_VER=1900"));
}
#endif
NoIncrementalMigration.setValue(true);
StopOnParseErr.setValue(true);
Tool.setPrintErrorMessage(false);
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/Driver/test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Initialization

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cuInit | FileCheck %s -check-prefix=CUINIT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Memory Management

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cuArrayDestroy | FileCheck %s -check-prefix=CUARRAYDESTROY
Expand Down
2 changes: 1 addition & 1 deletion clang/test/dpct/query_api_mapping/Math/test-after9.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0

/// Half Precision Conversion and Data Movement

Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/Math/test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Double Precision Intrinsics

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__dadd_rd | FileCheck %s -check-prefix=__DADD_RD
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Double Precision Mathematical Functions

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=acos | FileCheck %s -check-prefix=ACOS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Half Precision Conversion and Data Movement

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__float22half2_rn | FileCheck %s -check-prefix=__FLOAT22HALF2_RN
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/Math/test_simd.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// SIMD Intrinsics

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__vabs2 | FileCheck %s -check-prefix=VABS2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Single Precision Intrinsics

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__cosf | FileCheck %s -check-prefix=__COSF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Single Precision Mathematical Functions

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=acosf | FileCheck %s -check-prefix=ACOSF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Type Casting Intrinsics

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__double2float_rd | FileCheck %s -check-prefix=__DOUBLE2FLOAT_RD
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/NCCL/lit_nccl.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=ncclGetVersion | FileCheck %s -check-prefix=ncclGetVersion
// ncclGetVersion: CUDA API:
// ncclGetVersion-NEXT: ncclGetVersion(version /*int **/);
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/NoLib/test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=__assert_fail | FileCheck %s -check-prefix=__ASSERT_FAIL
// __ASSERT_FAIL: CUDA API:
// __ASSERT_FAIL-NEXT: __assert_fail(msg /*const char **/, file /*const char **/, line /*unsigned*/,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0, cuda-9.0, cuda-9.1, cuda-9.2
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2

/// Stream Management

Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/Runtime/test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Device Management

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaDeviceGetAttribute | FileCheck %s -check-prefix=CUDADEVICEGETATTRIBUTE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

/// Memory Management

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaArrayGetInfo | FileCheck %s -check-prefix=CUDAARRAYGETINFO
Expand Down
2 changes: 1 addition & 1 deletion clang/test/dpct/query_api_mapping/cuBLAS/blas_9_2.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0, cuda-9.0, cuda-9.1
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0, v9.0, v9.1

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasCgemmBatched | FileCheck %s -check-prefix=cublasCgemmBatched
// cublasCgemmBatched: CUDA API:
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part1.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasZdscal | FileCheck %s -check-prefix=cublasZdscal
// cublasZdscal: CUDA API:
// cublasZdscal-NEXT: cublasZdscal(handle /*cublasHandle_t*/, n /*int*/, alpha /*const double **/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part2.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasDotEx | FileCheck %s -check-prefix=cublasDotEx
// cublasDotEx: CUDA API:
// cublasDotEx-NEXT: cublasDotEx(handle /*cublasHandle_t*/, n /*int*/, x /*const void **/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part3.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasDgeam | FileCheck %s -check-prefix=cublasDgeam
// cublasDgeam: CUDA API:
// cublasDgeam-NEXT: cublasDgeam(handle /*cublasHandle_t*/, transa /*cublasOperation_t*/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part4.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasZgerc | FileCheck %s -check-prefix=cublasZgerc
// cublasZgerc: CUDA API:
// cublasZgerc-NEXT: cublasZgerc(handle /*cublasHandle_t*/, m /*int*/, n /*int*/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part5.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasDsyr | FileCheck %s -check-prefix=cublasDsyr
// cublasDsyr: CUDA API:
// cublasDsyr-NEXT: cublasDsyr(handle /*cublasHandle_t*/, upper_lower /*cublasFillMode_t*/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part6.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasCsscal | FileCheck %s -check-prefix=cublasCsscal
// cublasCsscal: CUDA API:
// cublasCsscal-NEXT: cublasCsscal(handle /*cublasHandle_t*/, n /*int*/, alpha /*const float **/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part7.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasZher2k | FileCheck %s -check-prefix=cublasZher2k
// cublasZher2k: CUDA API:
// cublasZher2k-NEXT: cublasZher2k(handle /*cublasHandle_t*/, upper_lower /*cublasFillMode_t*/,
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuBLAS/blas_part8.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cublasSgemmStridedBatched | FileCheck %s -check-prefix=cublasSgemmStridedBatched
// cublasSgemmStridedBatched: CUDA API:
// cublasSgemmStridedBatched-NEXT: cublasSgemmStridedBatched(
Expand Down
2 changes: 0 additions & 2 deletions clang/test/dpct/query_api_mapping/cuFFT/lit_cuFFT.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cufftExecZ2Z | FileCheck %s -check-prefix=cufftExecZ2Z
// cufftExecZ2Z: CUDA API:
// cufftExecZ2Z-NEXT: cufftHandle plan;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/dpct/query_api_mapping/cuRAND/test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0

/// Host API

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0, cuda-9.0, cuda-9.1
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0, v9.0, v9.1

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cusolverDnSpotrsBatched | FileCheck %s -check-prefix=cusolverDnSpotrsBatched
// cusolverDnSpotrsBatched: CUDA API:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UNSUPPORTED: cuda-8.0, cuda-9.0, cuda-9.1
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2, v10.0
// UNSUPPORTED: v8.0, v9.0, v9.1

// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cusolverDnCunmtr | FileCheck %s -check-prefix=cusolverDnCunmtr
// cusolverDnCunmtr: CUDA API:
Expand Down
Loading