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 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) 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)); } diff --git a/test/test_rocrand_hipgraphs.cpp b/test/test_rocrand_hipgraphs.cpp index 3b94186f6..912c99c55 100644 --- a/test/test_rocrand_hipgraphs.cpp +++ b/test/test_rocrand_hipgraphs.cpp @@ -34,34 +34,34 @@ 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(); + + if(beginCapture) + startStreamCapture(stream); + } + + 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