From 67080668cd848f070fb65aa8b3024f55019519eb Mon Sep 17 00:00:00 2001 From: Cosmin G Petra Date: Fri, 24 Jan 2025 11:36:25 -0800 Subject: [PATCH] Fix hipblas path (#705) * hipblas.h --> hipblas/hipblas.h * Guard hipblas path change with a condition on HIP_VERSION. --------- Co-authored-by: Nicholson Koukpaizan --- cmake/FindHiopHipLibraries.cmake | 2 +- src/LinAlg/VectorHipKernels.cpp | 4 ++++ src/LinAlg/hiopVectorHip.cpp | 4 ++++ src/LinAlg/hiopVectorHip.hpp | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/FindHiopHipLibraries.cmake b/cmake/FindHiopHipLibraries.cmake index a6f4b16c1..71f932614 100644 --- a/cmake/FindHiopHipLibraries.cmake +++ b/cmake/FindHiopHipLibraries.cmake @@ -39,7 +39,7 @@ target_include_directories(Hipblas INTERFACE ${HIPBLAS_INCLUDE_DIR}) include(FindHiopMagma) target_link_libraries(Magma INTERFACE Hipblas) -target_include_directories(hiop_hip INTERFACE ${ROCM_PATH}/hipfft/include) +target_include_directories(hiop_hip INTERFACE ${ROCM_PATH}/include/hipfft) target_link_libraries(hiop_hip INTERFACE hip::hiprand roc::rocrand hip::hipfft diff --git a/src/LinAlg/VectorHipKernels.cpp b/src/LinAlg/VectorHipKernels.cpp index 908a2c822..55db48992 100644 --- a/src/LinAlg/VectorHipKernels.cpp +++ b/src/LinAlg/VectorHipKernels.cpp @@ -53,7 +53,11 @@ */ #include "VectorHipKernels.hpp" #include +#if HIP_VERSION >= 50200000 +#include +#else #include +#endif #include #include diff --git a/src/LinAlg/hiopVectorHip.cpp b/src/LinAlg/hiopVectorHip.cpp index dafb0e66e..b7ce752cc 100644 --- a/src/LinAlg/hiopVectorHip.cpp +++ b/src/LinAlg/hiopVectorHip.cpp @@ -59,7 +59,11 @@ #include "VectorHipKernels.hpp" #include "MathKernelsHip.hpp" #include +#if HIP_VERSION >= 50200000 +#include +#else #include +#endif #include "hiopVectorPar.hpp" diff --git a/src/LinAlg/hiopVectorHip.hpp b/src/LinAlg/hiopVectorHip.hpp index 648ba8d0a..36922c1c9 100644 --- a/src/LinAlg/hiopVectorHip.hpp +++ b/src/LinAlg/hiopVectorHip.hpp @@ -65,7 +65,11 @@ #include "hiopVector.hpp" +#if HIP_VERSION >= 50200000 +#include +#else #include +#endif namespace hiop {