Skip to content

Commit

Permalink
use non-deprecated headers for HIP libs
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Sep 24, 2023
1 parent d51baed commit 708ddcc
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 4 deletions.
3 changes: 0 additions & 3 deletions benchmark/utils/hip_linops.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>


#include <hipsparse.h>


#include "benchmark/utils/sparselib_linops.hpp"
#include "benchmark/utils/types.hpp"
#include "hip/base/hipsparse_bindings.hip.hpp"
Expand Down
6 changes: 6 additions & 0 deletions hip/base/exception.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipblas/hipblas.h>
#include <hiprand/hiprand.h>
#include <hipsparse/hipsparse.h>
#else
#include <hipblas.h>
#include <hiprand.h>
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/types.hpp>
Expand Down
6 changes: 5 additions & 1 deletion hip/base/hipblas_bindings.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GKO_HIP_BASE_HIPBLAS_BINDINGS_HIP_HPP_
#define GKO_HIP_BASE_HIPBLAS_BINDINGS_HIP_HPP_


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipblas/hipblas.h>
#else
#include <hipblas.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
5 changes: 5 additions & 0 deletions hip/base/hiprand_bindings.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define GKO_HIP_BASE_HIPRAND_BINDINGS_HIP_HPP_


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hiprand/hiprand.h>
#else
#include <hiprand.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
5 changes: 5 additions & 0 deletions hip/base/hipsparse_bindings.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define GKO_HIP_BASE_HIPSPARSE_BINDINGS_HIP_HPP_


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipsparse/hipsparse.h>
#else
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
5 changes: 5 additions & 0 deletions hip/base/hipsparse_block_bindings.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define GKO_HIP_BASE_HIPSPARSE_BLOCK_BINDINGS_HIP_HPP_


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipsparse/hipsparse.h>
#else
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
5 changes: 5 additions & 0 deletions hip/base/pointer_mode_guard.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipblas/hipblas.h>
#include <hipsparse/hipsparse.h>
#else
#include <hipblas.h>
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
4 changes: 4 additions & 0 deletions hip/base/roctx.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#if GINKGO_HIP_PLATFORM_HCC && GKO_HAVE_ROCTX
#if HIP_VERSION >= 50200000
#include <roctracer/roctx.h>
#else
#include <roctx.h>
#endif
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
4 changes: 4 additions & 0 deletions hip/base/types.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <hip/hip_complex.h>
#include <hip/hip_fp16.h>
#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipblas/hipblas.h>
#else
#include <hipblas.h>
#endif
#include <thrust/complex.h>


Expand Down
5 changes: 5 additions & 0 deletions hip/matrix/fft_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <array>


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipfft/hipfft.h>
#else
#include <hipfft.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
4 changes: 4 additions & 0 deletions hip/solver/common_trs_kernels.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipsparse/hipsparse.h>
#else
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
4 changes: 4 additions & 0 deletions hip/solver/lower_trs_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipsparse/hipsparse.h>
#else
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
4 changes: 4 additions & 0 deletions hip/solver/upper_trs_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipsparse/hipsparse.h>
#else
#include <hipsparse.h>
#endif


#include <ginkgo/core/base/exception_helpers.hpp>
Expand Down
6 changes: 6 additions & 0 deletions hip/test/base/exception_helpers.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipblas/hipblas.h>
#include <hiprand/hiprand.h>
#include <hipsparse/hipsparse.h>
#else
#include <hipblas.h>
#include <hiprand.h>
#include <hipsparse.h>
#endif


#include <gtest/gtest.h>
Expand Down
5 changes: 5 additions & 0 deletions hip/test/matrix/fft_kernels.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ginkgo/core/matrix/fft.hpp>


#include <hip/hip_runtime.h>
#if HIP_VERSION >= 50200000
#include <hipfft/hipfft.h>
#else
#include <hipfft.h>
#endif


#include <gtest/gtest.h>
Expand Down

0 comments on commit 708ddcc

Please sign in to comment.