From bcdd285e33a431ba8d6e8c08fff687538ba856e0 Mon Sep 17 00:00:00 2001 From: MKKnorr Date: Wed, 16 Oct 2024 16:32:20 +0200 Subject: [PATCH] Fix rocSPARSE level_2 spsv example (#174) Fix memory leak due to temp_buffer not being freed --- Libraries/rocSPARSE/level_2/spsv/main.cpp | 1 + .../rocSPARSE/level_3/csrsm/rocsparse-calls | 29 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 Libraries/rocSPARSE/level_3/csrsm/rocsparse-calls diff --git a/Libraries/rocSPARSE/level_2/spsv/main.cpp b/Libraries/rocSPARSE/level_2/spsv/main.cpp index fa27192c7..9eeb43d9f 100644 --- a/Libraries/rocSPARSE/level_2/spsv/main.cpp +++ b/Libraries/rocSPARSE/level_2/spsv/main.cpp @@ -179,6 +179,7 @@ int main() ROCSPARSE_CHECK(rocsparse_destroy_dnvec_descr(descr_x)); ROCSPARSE_CHECK(rocsparse_destroy_dnvec_descr(descr_y)); + HIP_CHECK(hipFree(temp_buffer)); HIP_CHECK(hipFree(d_x)); HIP_CHECK(hipFree(d_y)); HIP_CHECK(hipFree(d_coo_val)); diff --git a/Libraries/rocSPARSE/level_3/csrsm/rocsparse-calls b/Libraries/rocSPARSE/level_3/csrsm/rocsparse-calls deleted file mode 100644 index 2d5e14d37..000000000 --- a/Libraries/rocSPARSE/level_3/csrsm/rocsparse-calls +++ /dev/null @@ -1,29 +0,0 @@ - -rocsparse_analysis_policy -rocsparse_analysis_policy_reuse -rocsparse_create_handle -rocsparse_create_mat_descr -rocsparse_create_mat_info -rocsparse_csrsm_zero_pivot -rocsparse_dcsrsm_analysis -rocsparse_dcsrsm_buffer_size -rocsparse_dcsrsm_solve -rocsparse_destroy_handle -rocsparse_destroy_mat_descr -rocsparse_destroy_mat_info -rocsparse_diag_type_non_unit)) -rocsparse_fill_mode_lower)) -rocsparse.h> -rocsparse_handle -rocsparse_int -rocsparse_mat_descr -rocsparse_mat_info -rocsparse_operation -rocsparse_operation_none -rocsparse_set_mat_diag_type -rocsparse_set_mat_fill_mode -rocsparse_solve_policy -rocsparse_solve_policy_auto -rocsparse_status -rocsparse_status_zero_pivot) -rocsparse_utils.hpp"