fix spmv buffer free for hip (#532)

This PR fixes a compile issue for HIP, introduced in #512 .
Co-authored-by: Ruipeng Li <coe0141@redwood.cm.cluster>
This commit is contained in:
Ruipeng Li 2021-11-22 15:31:43 -08:00 committed by GitHub
parent da32677ae0
commit 1a1c7b663e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,6 +95,7 @@ hypre_GpuMatDataDestroy(hypre_GpuMatData *data)
#if defined(HYPRE_USING_CUSPARSE)
HYPRE_CUSPARSE_CALL( cusparseDestroyMatDescr(hypre_GpuMatDataMatDecsr(data)) );
hypre_TFree(hypre_GpuMatDataSpMVBuffer(data), HYPRE_MEMORY_DEVICE);
#endif
#if defined(HYPRE_USING_ROCSPARSE)
@ -102,8 +103,6 @@ hypre_GpuMatDataDestroy(hypre_GpuMatData *data)
HYPRE_ROCSPARSE_CALL( rocsparse_destroy_mat_info(hypre_GpuMatDataMatInfo(data)) );
#endif
hypre_TFree(hypre_GpuMatDataSpMVBuffer(data), HYPRE_MEMORY_DEVICE);
hypre_TFree(data, HYPRE_MEMORY_HOST);
}