From cef8ab9d2cac1ad11c4ab54d297142b826bab23e Mon Sep 17 00:00:00 2001 From: Wayne Franz Date: Tue, 3 Sep 2024 15:55:36 -0400 Subject: [PATCH 01/13] 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. --- scripts/copyright-date/check-copyright.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/copyright-date/check-copyright.sh b/scripts/copyright-date/check-copyright.sh index 04d941b96..fccbdb9ac 100755 --- a/scripts/copyright-date/check-copyright.sh +++ b/scripts/copyright-date/check-copyright.sh @@ -61,7 +61,6 @@ if $forkdiff; then source_commit="remotes/$remote/HEAD" # don't use fork-point for finding fork point (lol) - # see: https://stackoverflow.com/a/53981615 diff_hash="$(git merge-base "$source_commit" "$branch")" fi From c8fb50444e33657fd625034a9a2086ced1343d61 Mon Sep 17 00:00:00 2001 From: amd-garydeng Date: Thu, 5 Sep 2024 15:19:50 -0600 Subject: [PATCH 02/13] Add gfx1151 target (#543) (#546) Co-authored-by: Stanley Tsang Co-authored-by: Eiden Yoshida --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83e88331f..b4acfd4bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,7 +101,7 @@ if(GPU_TARGETS STREQUAL "all") ) else() rocm_check_target_ids(DEFAULT_AMDGPU_TARGETS - TARGETS "gfx803;gfx900:xnack-;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201" + TARGETS "gfx803;gfx900:xnack-;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201;gfx1151" ) endif() From e8bcc6201835feb7f2f03c5f2bdfe86d6bb24861 Mon Sep 17 00:00:00 2001 From: Jeffrey Novotny Date: Tue, 17 Sep 2024 12:14:34 -0400 Subject: [PATCH 03/13] Move data type support file along with index and ToC changes (#548) (#549) --- docs/{conceptual => api-reference}/data-type-support.rst | 2 +- docs/index.rst | 3 ++- docs/sphinx/_toc.yml.in | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename docs/{conceptual => api-reference}/data-type-support.rst (99%) diff --git a/docs/conceptual/data-type-support.rst b/docs/api-reference/data-type-support.rst similarity index 99% rename from docs/conceptual/data-type-support.rst rename to docs/api-reference/data-type-support.rst index 619300306..faba618d8 100644 --- a/docs/conceptual/data-type-support.rst +++ b/docs/api-reference/data-type-support.rst @@ -4,7 +4,7 @@ .. _data-type-support: -Data type support +rocRAND data type support ****************************************** Host API diff --git a/docs/index.rst b/docs/index.rst index eba1fb946..a7eeddaf0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,12 +31,13 @@ The documentation is structured as follows: .. grid-item-card:: Conceptual * :ref:`programmers-guide` - * :ref:`data-type-support` + * :ref:`curand-compatibility` * :ref:`dynamic-ordering-configuration` .. grid-item-card:: API reference + * :doc:`rocRAND data type support ` * :ref:`cpp-api` * :ref:`python-api` * :doc:`Fortran API reference ` diff --git a/docs/sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in index 11dd63904..c2fb9a9bb 100644 --- a/docs/sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -8,11 +8,11 @@ subtrees: - caption: Conceptual entries: - file: conceptual/programmers-guide - - file: conceptual/data-type-support - file: conceptual/curand-compatibility - file: conceptual/dynamic_ordering_configuration - caption: API reference entries: + - file: api-reference/data-type-support - file: api-reference/cpp-api - file: api-reference/python-api - file: fortran-api-reference From 296a9c99d10ee2c2f2811466c25179b32177d0bc Mon Sep 17 00:00:00 2001 From: zenguyen Date: Mon, 23 Sep 2024 22:07:16 +0000 Subject: [PATCH 04/13] added hipFree to test_rocrand_cpp_basic --- test/test_rocrand_cpp_basic.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_rocrand_cpp_basic.cpp b/test/test_rocrand_cpp_basic.cpp index 7ae31b386..d17a766de 100644 --- a/test/test_rocrand_cpp_basic.cpp +++ b/test/test_rocrand_cpp_basic.cpp @@ -84,8 +84,9 @@ TYPED_TEST(rocrand_cpp_basic_tests, move_construction) float actual; HIP_CHECK(hipMemcpy(&actual, d_data, sizeof(actual), hipMemcpyDeviceToHost)); - ASSERT_EQ(expected, actual); + + HIP_CHECK(hipFree(d_data)); } TYPED_TEST(rocrand_cpp_basic_tests, move_assignment) @@ -119,6 +120,7 @@ TYPED_TEST(rocrand_cpp_basic_tests, move_assignment) float actual; HIP_CHECK(hipMemcpy(&actual, d_data, sizeof(actual), hipMemcpyDeviceToHost)); - ASSERT_EQ(expected, actual); + + HIP_CHECK(hipFree(d_data)); } From 7af3809aa6e34cd4bedf3e989e18a007381d45d6 Mon Sep 17 00:00:00 2001 From: zenguyen Date: Tue, 24 Sep 2024 22:36:36 +0000 Subject: [PATCH 05/13] fixed memory leak for test_rocrand_config_dispatch --- test/internal/test_rocrand_config_dispatch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/internal/test_rocrand_config_dispatch.cpp b/test/internal/test_rocrand_config_dispatch.cpp index 1d1cda080..06bef1c4d 100644 --- a/test/internal/test_rocrand_config_dispatch.cpp +++ b/test/internal/test_rocrand_config_dispatch.cpp @@ -89,6 +89,8 @@ TEST(rocrand_config_dispatch_tests, host_matches_device) ASSERT_NE(host_arch, rocrand_impl::host::target_arch::invalid); ASSERT_EQ(host_arch, device_arch); + + HIP_CHECK(hipFree(device_arch_ptr)); } TEST(rocrand_config_dispatch_tests, parse_common_architectures) From 9709b372ff04b3733c00f3d1dd4fed58e4be0a54 Mon Sep 17 00:00:00 2001 From: zenguyen Date: Thu, 26 Sep 2024 16:34:42 +0000 Subject: [PATCH 06/13] fixed a memory leak in test_utils --- test/test_rocrand_hipgraphs.cpp | 45 +++++++------- test/test_utils_hipgraphs.hpp | 103 ++++++++++++++------------------ 2 files changed, 67 insertions(+), 81 deletions(-) diff --git a/test/test_rocrand_hipgraphs.cpp b/test/test_rocrand_hipgraphs.cpp index 3b94186f6..ca049de26 100644 --- a/test/test_rocrand_hipgraphs.cpp +++ b/test/test_rocrand_hipgraphs.cpp @@ -34,34 +34,33 @@ void test_float(std::functiongraph)); + HIP_CHECK_NON_VOID(hipGraphExecDestroy(this->graph_instance)); + } + + inline void resetGraphHelper(hipStream_t& stream, const bool beginCapture=true) + { + // Destroy the old graph and instance + cleanupGraphHelper(); + + // Create a new graph and optionally begin capture + createGraph(stream, beginCapture); + } + + inline void launchGraphHelper(hipStream_t& stream,const bool sync=false) + { + HIP_CHECK_NON_VOID(hipGraphLaunch(this->graph_instance, stream)); + + // Optionally sync after the launch + if (sync) + HIP_CHECK_NON_VOID(hipStreamSynchronize(stream)); + } + }; } // end namespace test_utils #endif //ROCRAND_TEST_UTILS_HIPGRAPHS_HPP From d958870a8ba40a44c5c23093732e27b86f1732b3 Mon Sep 17 00:00:00 2001 From: NguyenNhuDi Date: Thu, 3 Oct 2024 15:48:24 +0000 Subject: [PATCH 07/13] changed createGraph to createAndLaunchGraph, as well as fixed stream capture order --- test/test_rocrand_hipgraphs.cpp | 23 +++++++++++++---------- test/test_utils_hipgraphs.hpp | 20 +++++++++++++------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/test/test_rocrand_hipgraphs.cpp b/test/test_rocrand_hipgraphs.cpp index ca049de26..e501dceb7 100644 --- a/test/test_rocrand_hipgraphs.cpp +++ b/test/test_rocrand_hipgraphs.cpp @@ -36,12 +36,13 @@ void test_float(std::function Date: Thu, 3 Oct 2024 15:52:06 +0000 Subject: [PATCH 08/13] changed default boolean (kaunchGraph, sync) to be true in createAndLaunchGraph --- test/test_rocrand_hipgraphs.cpp | 18 +++++++++--------- test/test_utils_hipgraphs.hpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/test_rocrand_hipgraphs.cpp b/test/test_rocrand_hipgraphs.cpp index e501dceb7..9057b8fc7 100644 --- a/test/test_rocrand_hipgraphs.cpp +++ b/test/test_rocrand_hipgraphs.cpp @@ -42,7 +42,7 @@ void test_float(std::function Date: Thu, 3 Oct 2024 15:55:12 +0000 Subject: [PATCH 09/13] added back missing end stream capture --- test/test_utils_hipgraphs.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_utils_hipgraphs.hpp b/test/test_utils_hipgraphs.hpp index 941bbe17e..32a1eae07 100644 --- a/test/test_utils_hipgraphs.hpp +++ b/test/test_utils_hipgraphs.hpp @@ -44,6 +44,8 @@ namespace test_utils inline void createAndLaunchGraph(hipStream_t & stream, const bool launchGraph=true, const bool sync=true){ + endStreamCapture(stream); + HIP_CHECK_NON_VOID(hipGraphInstantiate(&graph_instance, graph, nullptr, nullptr, 0)); // Optionally launch the graph From a2a4b8ecb99dbbb4fa11842cb88377055ce12303 Mon Sep 17 00:00:00 2001 From: NguyenNhuDi Date: Fri, 11 Oct 2024 21:08:03 +0000 Subject: [PATCH 10/13] reformated curlys for consistency --- test/test_utils_hipgraphs.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_utils_hipgraphs.hpp b/test/test_utils_hipgraphs.hpp index 32a1eae07..2d69ce50c 100644 --- a/test/test_utils_hipgraphs.hpp +++ b/test/test_utils_hipgraphs.hpp @@ -34,15 +34,18 @@ namespace test_utils hipGraphExec_t graph_instance; public: - inline void startStreamCapture(hipStream_t & stream){ + inline void startStreamCapture(hipStream_t & stream) + { HIP_CHECK_NON_VOID(hipStreamBeginCapture(stream, hipStreamCaptureModeGlobal)); } - inline void endStreamCapture(hipStream_t & stream){ + inline void endStreamCapture(hipStream_t & stream) + { HIP_CHECK_NON_VOID(hipStreamEndCapture(stream, &graph)); } - inline void createAndLaunchGraph(hipStream_t & stream, const bool launchGraph=true, const bool sync=true){ + inline void createAndLaunchGraph(hipStream_t & stream, const bool launchGraph=true, const bool sync=true) + { endStreamCapture(stream); From f0f648ac44707dce976341aa2e322e216cd83989 Mon Sep 17 00:00:00 2001 From: NguyenNhuDi Date: Fri, 11 Oct 2024 21:22:48 +0000 Subject: [PATCH 11/13] removed createAndLaunchGraph inside resetGraphHelper --- test/test_rocrand_hipgraphs.cpp | 2 +- test/test_utils_hipgraphs.hpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test_rocrand_hipgraphs.cpp b/test/test_rocrand_hipgraphs.cpp index 9057b8fc7..912c99c55 100644 --- a/test/test_rocrand_hipgraphs.cpp +++ b/test/test_rocrand_hipgraphs.cpp @@ -43,7 +43,7 @@ void test_float(std::function Date: Fri, 18 Oct 2024 21:07:13 +0000 Subject: [PATCH 12/13] Revert "Remove website URL from comments (#542)" This reverts commit cef8ab9d2cac1ad11c4ab54d297142b826bab23e. --- scripts/copyright-date/check-copyright.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/copyright-date/check-copyright.sh b/scripts/copyright-date/check-copyright.sh index fccbdb9ac..04d941b96 100755 --- a/scripts/copyright-date/check-copyright.sh +++ b/scripts/copyright-date/check-copyright.sh @@ -61,6 +61,7 @@ if $forkdiff; then source_commit="remotes/$remote/HEAD" # don't use fork-point for finding fork point (lol) + # see: https://stackoverflow.com/a/53981615 diff_hash="$(git merge-base "$source_commit" "$branch")" fi From 91da126ff89276f3a4ce45af80d76e71ffaadad8 Mon Sep 17 00:00:00 2001 From: NguyenNhuDi Date: Fri, 18 Oct 2024 21:09:34 +0000 Subject: [PATCH 13/13] Revert "Revert "Remove website URL from comments (#542)"" This reverts commit 4dbdf9cc1a3d35c9a12c1b667d997795b5b7f806. --- scripts/copyright-date/check-copyright.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/copyright-date/check-copyright.sh b/scripts/copyright-date/check-copyright.sh index 04d941b96..fccbdb9ac 100755 --- a/scripts/copyright-date/check-copyright.sh +++ b/scripts/copyright-date/check-copyright.sh @@ -61,7 +61,6 @@ if $forkdiff; then source_commit="remotes/$remote/HEAD" # don't use fork-point for finding fork point (lol) - # see: https://stackoverflow.com/a/53981615 diff_hash="$(git merge-base "$source_commit" "$branch")" fi