From: Cordell Bloor <cgmb@slerp.xyz>
Date: Fri, 2 Dec 2022 01:58:19 -0700
Subject: hide kernel symbols

ROCSPARSE_KERNEL exists because the early versions of HIP for Windows
did not use weak symbols for kernels even when they were inline. While
it was defined in a public header, the define was intended for internal
use within the library, adding `static` on Windows to work around that
bug.

This patch adds `static` to Linux as well. It seems that kernels are
unaffected by -fvisibility=hidden. To ensure that there are no name
collisions between rocSPARSE kernels and application kernels, the
rocSPARSE kernels will be marked as static.

Fixed upstream in 4fd6929bd4204f3492fe672ba24e310b7707282e.
---
 library/include/rocsparse-types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/include/rocsparse-types.h b/library/include/rocsparse-types.h
index 486c40d..43523cf 100644
--- a/library/include/rocsparse-types.h
+++ b/library/include/rocsparse-types.h
@@ -37,7 +37,7 @@
 #define ROCSPARSE_KERNEL __global__ static
 #define ROCSPARSE_DEVICE_ILF __device__ __forceinline__
 #else
-#define ROCSPARSE_KERNEL __global__
+#define ROCSPARSE_KERNEL __global__ static
 #define ROCSPARSE_DEVICE_ILF __device__
 #endif
 
