Skip to content

Fixed memory leaks in rocrand_tests - #557

Merged
umfranzw merged 8 commits into
ROCm:release-staging/rocm-rel-6.3from
NguyenNhuDi:zenguyen/mem-leak-fix
Oct 17, 2024
Merged

umfranzw merged 8 commits into
ROCm:release-staging/rocm-rel-6.3from
NguyenNhuDi:zenguyen/mem-leak-fix

Conversation

@NguyenNhuDi

Copy link
Copy Markdown
Collaborator

Added missing hipFree calls to test_rocrand_config_dispatch and test_rocrand_cpp_basic. Fixed an issue where test_utils was calling an extra hipCreateGraph call causing a graph to be overwritten which led to a memory leak.

@umfranzw umfranzw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look through the change - it's really nice to have the helper as a class. I just have a few suggestions for some more changes to the way a few of the new helper member functions work.

Comment thread test/test_rocrand_hipgraphs.cpp Resolved
Comment thread test/test_rocrand_hipgraphs.cpp Resolved
Comment thread test/test_utils_hipgraphs.hpp Resolved
Comment thread test/test_utils_hipgraphs.hpp Resolved

@umfranzw umfranzw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good - I've just mentioned two more small things I noticed below.

Comment thread test/test_utils_hipgraphs.hpp Resolved
Comment thread test/test_utils_hipgraphs.hpp Resolved
@umfranzw
umfranzw merged commit c1640d9 into ROCm:release-staging/rocm-rel-6.3 Oct 17, 2024
stanleytsang-amd added a commit that referenced this pull request Nov 20, 2024
* Remove website URL from comments (#542)

Referencing or using code from some websites is prohibited in this repository.
This change removes an informational reference in the comments.

* Add gfx1151 target (#543) (#546)

Co-authored-by: Stanley Tsang <stanley.tsang@amd.com>
Co-authored-by: Eiden Yoshida <eiden.yoshida@amd.com>

* Move data type support file along with index and ToC changes (#548) (#549)

* Convert change log to new format (#564)

* Fixed memory leaks in rocrand_tests (#557)

* added hipFree to test_rocrand_cpp_basic

* fixed memory leak for test_rocrand_config_dispatch

* fixed a memory leak in test_utils

* changed createGraph to createAndLaunchGraph, as well as fixed stream capture order

* changed default boolean (kaunchGraph, sync)  to be true in createAndLaunchGraph

* added back missing end stream capture

* reformated curlys for consistency

* removed createAndLaunchGraph inside resetGraphHelper

* Update changelog release headers (#568) (#575)

* Update changelog release headers

* Small correction

(cherry picked from commit c7da202)

* Add readme and metadata info and clarify CUDA references (#567) (#576)

(cherry picked from commit 81d9e58)

* added gfx12 and gfx1151 to default gpu list

* updated changelog

* Update CHANGELOG.md

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

* Update CHANGELOG.md

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

* Remove gfx940,gfx941 targets (#580)

* Remove unreleased

---------

Co-authored-by: Wayne Franz <wayfranz@amd.com>
Co-authored-by: amd-garydeng <garydeng@amd.com>
Co-authored-by: Eiden Yoshida <eiden.yoshida@amd.com>
Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>
Co-authored-by: Di Nguyen <dinguyennhu@gmail.com>
Co-authored-by: Val Movsik <160653499+vamovsik@users.noreply.github.com>
ammallya pushed a commit that referenced this pull request Oct 28, 2025
* Remove website URL from comments (#542)

Referencing or using code from some websites is prohibited in this repository.
This change removes an informational reference in the comments.

* Add gfx1151 target (#543) (#546)

Co-authored-by: Stanley Tsang <stanley.tsang@amd.com>
Co-authored-by: Eiden Yoshida <eiden.yoshida@amd.com>

* Move data type support file along with index and ToC changes (#548) (#549)

* Convert change log to new format (#564)

* Fixed memory leaks in rocrand_tests (#557)

* added hipFree to test_rocrand_cpp_basic

* fixed memory leak for test_rocrand_config_dispatch

* fixed a memory leak in test_utils

* changed createGraph to createAndLaunchGraph, as well as fixed stream capture order

* changed default boolean (kaunchGraph, sync)  to be true in createAndLaunchGraph

* added back missing end stream capture

* reformated curlys for consistency

* removed createAndLaunchGraph inside resetGraphHelper

* Update changelog release headers (#568) (#575)

* Update changelog release headers

* Small correction

(cherry picked from commit dd6bfa0)

* Add readme and metadata info and clarify CUDA references (#567) (#576)

(cherry picked from commit ef0c470)

* added gfx12 and gfx1151 to default gpu list

* updated changelog

* Update CHANGELOG.md

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

* Update CHANGELOG.md

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

* Remove gfx940,gfx941 targets (#580)

* Remove unreleased

---------

Co-authored-by: Wayne Franz <wayfranz@amd.com>
Co-authored-by: amd-garydeng <garydeng@amd.com>
Co-authored-by: Eiden Yoshida <eiden.yoshida@amd.com>
Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>
Co-authored-by: Di Nguyen <dinguyennhu@gmail.com>
Co-authored-by: Val Movsik <160653499+vamovsik@users.noreply.github.com>

[ROCm/rocRAND commit: 92b761a]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants