Skip to content

Commit

Permalink
[HIPIFY][tests][fix] Fix the test headers/headers_test_12_SOLVER.cu
Browse files Browse the repository at this point in the history
… failed on CUDA < 10010

[Reason] `cusolverMg.h` appeared in CUDA 10.1
  • Loading branch information
emankov committed Jan 8, 2024
1 parent 090e1fc commit 662a1ec
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/unit_tests/headers/headers_test_12_SOLVER.cu
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
// RUN: %run_test hipify "%s" "%t" %hipify_args 1 --skip-excluded-preprocessor-conditional-blocks %clang_args

// Checks that HIP header file is included after include guard controlling macro,
// which goes before #pragma once.
// CHECK: #ifndef HEADERS_TEST_12_SOLVER_H
// CHECK-NEXT: #include <hip/hip_runtime.h>
#ifndef HEADERS_TEST_12_SOLVER_H
// CHECK: #pragma once
#pragma once
// CHECK-NOT: #include <hip/hip_runtime.h>
#define HEADERS_TEST_12_SOLVER_H
#include <stdio.h>
// CHECK: #include <hip/hip_runtime.h>
// CHECK-NOT: #include <cuda_runtime.h>
#include <cuda_runtime.h>
static int counter = 0;

// CHECK: #include "hipsolver.h"
// CHECK-NOT: #include "hipsolver.h"
// CHECK-NOT: #include "cusolver_common.h"
// CHECK-NOT: #include "cusolverDn.h"
// CHECK-NOT: #include "cusolverRf.h"
// CHECK-NOT: #include "cusolverMg.h"
// CHECK-NOT: #include "cusolverSp.h"
// CHECK-NOT: #include "cusolverSp_LOWLEVEL_PREVIEW.h"
#include "cusolver_common.h"
#include "cusolverDn.h"
#include "cusolverRf.h"
#if CUDA_VERSION >= 10010
#include "cusolverMg.h"
#endif
#include "cusolverSp.h"
#include "cusolverSp_LOWLEVEL_PREVIEW.h"

Expand Down

0 comments on commit 662a1ec

Please sign in to comment.