Skip to content

Commit 4c88c3e

Browse files
committed
[HIP] rough way of adding cuda_wrapper tests from Externals/CUDA
1 parent a45d162 commit 4c88c3e

12 files changed

+36
-0
lines changed

External/HIP/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ macro(create_local_hip_tests VariantSuffix)
2222
list(APPEND HIP_LOCAL_TESTS saxpy)
2323
list(APPEND HIP_LOCAL_TESTS memmove)
2424
list(APPEND HIP_LOCAL_TESTS split-kernel-args)
25+
list(APPEND HIP_LOCAL_TESTS algorithm)
26+
list(APPEND HIP_LOCAL_TESTS cmath)
27+
list(APPEND HIP_LOCAL_TESTS complex)
28+
list(APPEND HIP_LOCAL_TESTS math_h)
29+
list(APPEND HIP_LOCAL_TESTS new)
2530

2631
# TODO: Re-enable InOneWeekend after it is fixed
2732
#list(APPEND HIP_LOCAL_TESTS InOneWeekend)

External/HIP/algorithm.hip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "cuda2hip.h"
2+
#include "../CUDA/algorithm.cu"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Success!
2+
exit 0

External/HIP/cmath.hip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "cuda2hip.h"
2+
#include "../CUDA/cmath.cu"

External/HIP/cmath.reference_output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Success!
2+
exit 0

External/HIP/complex.hip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "cuda2hip.h"
2+
#include "../CUDA/complex.cu"

External/HIP/complex.reference_output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Success!
2+
exit 0

External/HIP/cuda2hip.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef CUDA_2_HIP
2+
#define CUDA_2_HIP
3+
4+
#include "hip/hip_runtime.h"
5+
6+
#define cudaError_t hipError_t
7+
#define cudaSuccess hipSuccess
8+
#define cudaDeviceSynchronize hipDeviceSynchronize
9+
10+
#endif

External/HIP/math_h.hip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "cuda2hip.h"
2+
#include "../CUDA/math_h.cu"
3+

External/HIP/math_h.reference_output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Success!
2+
exit 0

External/HIP/new.hip

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "cuda2hip.h"
2+
#include "../CUDA/new.cu"

External/HIP/new.reference_output

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Success!
2+
exit 0

0 commit comments

Comments
 (0)