Skip to content

Commit

Permalink
[HIPIFY][tests][fix] Fix for the header test failed on CUDA 7.0.0
Browse files Browse the repository at this point in the history
[Reason] `cuda_fp16.h` appeared only in CUDA `7.5.0`
  • Loading branch information
emankov committed Aug 28, 2024
1 parent 5ca3b0c commit 9da7381
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ if config.cuda_version_major == 7 and config.cuda_version_minor == 0:
config.excludes.append('cudnn_convolution_forward.cu')
config.excludes.append('cusparse2rocsparse_7050.cu')
config.excludes.append('headers_test_12_SOLVER_7050.cu')
config.excludes.append('headers_test_09_fp16_7050.cu')

if config.cuda_version_major < 8:
config.excludes.append('cuSPARSE_02.cu')
Expand Down
14 changes: 14 additions & 0 deletions tests/unit_tests/headers/headers_test_09_fp16_7050.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --default-preprocessor --roc %clang_args

// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
// CHECK-NOT: #include <hip/hip_runtime.h>
#include <memory>

#include <cuda_runtime.h>
// CHECK-NOT: #include <hip/hip_runtime.h>

#if CUDA_VERSION >= 7050
// CHECK: #include "hip/hip_fp16.h"
#include "cuda_fp16.h"
#endif
2 changes: 0 additions & 2 deletions tests/unit_tests/headers/headers_test_09_rocrand.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// CHECK: #include "hip/device_functions.h"
// CHECK: #include "hip/driver_types.h"
// CHECK: #include "hip/hip_complex.h"
// CHECK: #include "hip/hip_fp16.h"
// CHECK: #include "hip/hip_texture_types.h"
// CHECK: #include "hip/hip_vector_types.h"

Expand Down Expand Up @@ -76,7 +75,6 @@
#include "device_functions.h"
#include "driver_types.h"
#include "cuComplex.h"
#include "cuda_fp16.h"
#include "cuda_texture_types.h"
#include "vector_types.h"

Expand Down

0 comments on commit 9da7381

Please sign in to comment.