Skip to content

[rocSPARSE] sync before hipFree. (#1705)#1726

Merged
vamovsik merged 3 commits intoROCm:release/rocm-rel-7.0from
kliegeois:rocsparse_hipfree
Sep 26, 2025
Merged

[rocSPARSE] sync before hipFree. (#1705)#1726
vamovsik merged 3 commits intoROCm:release/rocm-rel-7.0from
kliegeois:rocsparse_hipfree

Conversation

@kliegeois
Copy link
Contributor

Propagate #1705 to 7.0.

Since HIP 7.0 `hipFree` is not implicitly blocking as before (see
https://rocm.docs.amd.com/projects/HIP/en/latest/hip-7-changes.html#update-hipfree
). Specifically if we allocate using `hipMallocAsync` and then try to
free using `hipFree`, the `hipFree` will not be blocking. This means
that in the cases where we allocate using `hipMallocAsync` and then free
using `hipFree` (for example when the stream is not available for the
free), we need to do an explicit synchronization.

This PR adds required synchronization points.

This PR also reverts ROCm#1609 as it is not required anymore.
coverage target no longer generates html
@ntrost57 ntrost57 self-requested a review September 25, 2025 05:49
@vamovsik vamovsik merged commit a589ab3 into ROCm:release/rocm-rel-7.0 Sep 26, 2025
8 of 9 checks passed
assistant-librarian bot pushed a commit to ROCm/rocSPARSE that referenced this pull request Sep 26, 2025
[rocSPARSE] sync before hipFree. (#1705)

Propagate #1705 to 7.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants