EXSWHTEC-217 - Implement new and update existing tests for the hipGraph*MemcpyNode family of APIs #48

Change-Id: Iae7ac9c855ba6e3288257e99e49f8b16cebb1bac


[ROCm/hip-tests commit: cefbaed5cf]
This commit is contained in:
Mirza Halilčević
2023-12-28 19:34:33 +01:00
committed by Rakesh Roy
parent 25263b8553
commit 4194470cd6
13 changed files with 2090 additions and 1158 deletions
@@ -141,6 +141,7 @@ void MemcpyDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream =
int can_access_peer = 0;
HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, src_device, dst_device));
if (!can_access_peer) {
INFO("Peer access cannot be enabled between devices " << src_device << " " << dst_device);
return;
}
HIP_CHECK(hipDeviceEnablePeerAccess(dst_device, 0));
@@ -168,8 +169,8 @@ void MemcpyDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream =
HIP_CHECK(
hipMemcpy(result.host_ptr(), dst_allocation.ptr(), allocation_size, hipMemcpyDeviceToHost));
if constexpr (enable_peer_access) {
// If we've gotten this far, EnablePeerAccess must have succeeded, so we only need to check this
// condition
// If we've gotten this far, EnablePeerAccess must have succeeded, so we
// only need to check this condition
HIP_CHECK(hipDeviceDisablePeerAccess(dst_device));
}
@@ -237,7 +238,6 @@ void MemcpySyncBehaviorCheck(F memcpy_func, const bool should_sync,
LaunchDelayKernel(std::chrono::milliseconds{100}, kernel_stream);
HIP_CHECK(memcpy_func());
if (should_sync) {
HIP_CHECK(hipStreamSynchronize(kernel_stream));
HIP_CHECK(hipStreamQuery(kernel_stream));
} else {
HIP_CHECK_ERROR(hipStreamQuery(kernel_stream), hipErrorNotReady);
@@ -23,6 +23,7 @@ THE SOFTWARE.
#pragma once
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#pragma clang diagnostic ignored "-Wunused-lambda-capture"
#include <variant>
#include <hip_test_common.hh>