mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Restore old HAVE_CUDA value
This commit is contained in:
parent
a4cf50c1fc
commit
270dcd53fc
@ -30,6 +30,11 @@
|
||||
// MultisegmentWellContribution includes the cuda runtime if found by CMake
|
||||
// this leads to inclusion of both amd_hip_vector_types.h and vector_types.h
|
||||
// which both define vector types like uchar2, short3 and double4.
|
||||
// Restore the value (if defined) afterwards.
|
||||
#ifdef HAVE_CUDA
|
||||
#define HIP_HAVE_CUDA_DEFINED HAVE_CUDA
|
||||
#endif
|
||||
|
||||
#undef HAVE_CUDA
|
||||
|
||||
#include <opm/simulators/linalg/bda/rocalutionSolverBackend.hpp>
|
||||
@ -37,6 +42,11 @@
|
||||
#include <rocalution.hpp>
|
||||
#include <base/matrix_formats_ind.hpp> // check if blocks are interpreted as row-major or column-major
|
||||
|
||||
#ifdef HIP_HAVE_CUDA_DEFINED
|
||||
#define HAVE_CUDA HIP_HAVE_CUDA_DEFINED
|
||||
#undef HIP_HAVE_CUDA_DEFINED
|
||||
#endif
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
namespace Accelerator
|
||||
|
@ -29,6 +29,11 @@
|
||||
// MultisegmentWellContribution includes the cuda runtime if found by CMake
|
||||
// this leads to inclusion of both amd_hip_vector_types.h and vector_types.h
|
||||
// which both define vector types like uchar2, short3 and double4.
|
||||
// Restore the value (if defined) afterwards.
|
||||
#ifdef HAVE_CUDA
|
||||
#define HIP_HAVE_CUDA_DEFINED HAVE_CUDA
|
||||
#endif
|
||||
|
||||
#undef HAVE_CUDA
|
||||
|
||||
#include <opm/simulators/linalg/bda/rocsparseSolverBackend.hpp>
|
||||
@ -38,6 +43,11 @@
|
||||
#include <hip/hip_runtime_api.h>
|
||||
#include <hip/hip_version.h>
|
||||
|
||||
#ifdef HIP_HAVE_CUDA_DEFINED
|
||||
#define HAVE_CUDA HIP_HAVE_CUDA_DEFINED
|
||||
#undef HIP_HAVE_CUDA_DEFINED
|
||||
#endif
|
||||
|
||||
#define HIP_CHECK(stat) \
|
||||
{ \
|
||||
if(stat != hipSuccess) \
|
||||
|
Loading…
Reference in New Issue
Block a user