Skip to content

Commit

Permalink
[HIPIFY][ROCm#1302][tests][fix] Added --amap option to some of the …
Browse files Browse the repository at this point in the history
…broken tests

[Reason] To overwrite the 'default-preprocessor' behavior
  • Loading branch information
emankov committed Jan 29, 2024
1 parent 5771e13 commit 8a266c5
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion tests/unit_tests/libraries/cuComplex/cuComplex_Julia.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 1 --skip-excluded-preprocessor-conditional-blocks %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --amap --skip-excluded-preprocessor-conditional-blocks %clang_args

// CHECK: #include <hip/hip_runtime.h>
// CHECK: #include "hip/hip_complex.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --hip-kernel-execution-syntax --skip-excluded-preprocessor-conditional-blocks %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --hip-kernel-execution-syntax --skip-excluded-preprocessor-conditional-blocks %clang_args

#include <iomanip>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/libraries/cuDNN/cudnn_softmax.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 1 --amap %clang_args

// CHECK: #include <hip/hip_runtime.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 1 --skip-excluded-preprocessor-conditional-blocks %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --amap --skip-excluded-preprocessor-conditional-blocks %clang_args
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 1 --skip-excluded-preprocessor-conditional-blocks %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --amap --skip-excluded-preprocessor-conditional-blocks %clang_args
/*
Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_defines.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_enums.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_functions.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_structs.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_typedefs.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/driver_unions.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cublas2hipblas.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cublas2hipblas_v2.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cublas2rocblas.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500
// RUN: %run_test hipify "%s" "%t" %hipify_args 4 --amap --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 4 --amap --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cusolver2hipsolver.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cusolver2rocsolver.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500
// RUN: %run_test hipify "%s" "%t" %hipify_args 4 --amap --skip-excluded-preprocessor-conditional-blocks --experimental --roc %clang_args -D__CUDA_API_VERSION_INTERNAL -ferror-limit=500

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/libraries/cusparse2hipsparse.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --skip-excluded-preprocessor-conditional-blocks --experimental --use-hip-data-types %clang_args -ferror-limit=500
// RUN: %run_test hipify "%s" "%t" %hipify_args 4 --amap --skip-excluded-preprocessor-conditional-blocks --experimental --use-hip-data-types %clang_args -ferror-limit=500

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_defines.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime_api.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_enums.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime_api.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_functions.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_structs.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime_api.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_typedefs.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime_api.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/synthetic/runtime_unions.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -D__CUDA_API_VERSION_INTERNAL

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
Expand Down

0 comments on commit 8a266c5

Please sign in to comment.