commit 38fafed3467998b1d635d0c15f089911901bff60
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Feb 4 09:27:39 2025 +0100

    Fix building with hip but without hipblas
    
    starpu_hipblas_get_local_handle() will not be useful in that case
    anyway. starpu_hipblas_init/shutdown being available is however
    convenient.
    
    (cherry picked from commit 1807cc564683ed2d7ab403350faef6e10de4d996)

---
 include/starpu_config.h.in |    8 ++++++++
 include/starpu_hipblas.h   |   12 ++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

--- a/include/starpu_hipblas.h
+++ b/include/starpu_hipblas.h
@@ -17,6 +17,12 @@
 #ifndef __STARPU_HIPBLAS_H__
 #define __STARPU_HIPBLAS_H__
 
+#ifdef STARPU_USE_HIP
+#ifdef STARPU_USE_HIPBLAS
+#include <hipblas/hipblas.h>
+#endif
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -36,10 +42,7 @@ extern "C" {
 void starpu_hipblas_init(void);
 
 #ifdef STARPU_USE_HIP
-#ifndef STARPU_USE_HIPBLAS
-typedef void* hipblasHandle_t;
-#endif
-
+#ifdef STARPU_USE_HIPBLAS
 /**
    Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It
    is properly initialized and configured for multistream by
@@ -47,6 +50,7 @@ typedef void* hipblasHandle_t;
 */
 hipblasHandle_t starpu_hipblas_get_local_handle(void);
 #endif
+#endif
 
 /**
    Synchronously deinitialize the HIPBLAS library on
--- a/include/starpu_config.h.in
+++ b/include/starpu_config.h.in
@@ -84,6 +84,14 @@
 
 /**
    Defined when StarPU has been installed with
+   HIP BLAS support. It should be used in your code to detect the
+   availability of HIP BLAS.
+   @ingroup API_HIP_Extensions
+*/
+#undef STARPU_USE_HIPBLAS
+
+/**
+   Defined when StarPU has been installed with
    NVidia-ML support. It should be used in your code to detect the
    availability of NVML-related functions.
    @ingroup API_CUDA_Extensions
