SWDEV-489617 - Enable Unit_hipMemcpyAsync_Positive_Synchronization_Behavior

- Since any-host-to-any-host as always synchronous, there's no need for
separate functions
 - Removed 'return' statement as it skips the rest of the test.

Change-Id: If70e0b21ad8151311d5ac7c5de789f6265cf44b6


[ROCm/hip-tests commit: 3809d1bb75]
This commit is contained in:
Marko Arandjelovic
2024-10-30 15:43:46 +01:00
zatwierdzone przez Rakesh Roy
rodzic 32b07e3262
commit 719600ccc4
3 zmienionych plików z 4 dodań i 23 usunięć
@@ -298,9 +298,8 @@ template <typename F>
void MemcpyHtoHSyncBehavior(F memcpy_func, const bool should_sync,
const hipStream_t kernel_stream = nullptr) {
using LA = LinearAllocs;
const auto [src_alloc_type, dst_alloc_type] = GENERATE(
std::make_tuple(LA::malloc, LA::hipHostMalloc),
std::make_tuple(LA::hipHostMalloc, LA::malloc), std::make_tuple(LA::malloc, LA::malloc));
auto src_alloc_type = GENERATE(LA::malloc, LA::hipHostMalloc);
auto dst_alloc_type = GENERATE(LA::malloc, LA::hipHostMalloc);
LinearAllocGuard<int> src_alloc(src_alloc_type, kPageSize);
LinearAllocGuard<int> dst_alloc(dst_alloc_type, kPageSize);
@@ -308,15 +307,6 @@ void MemcpyHtoHSyncBehavior(F memcpy_func, const bool should_sync,
should_sync, kernel_stream);
}
template <typename F>
void MemcpyHPinnedtoHPinnedSyncBehavior(F memcpy_func, const bool should_sync,
const hipStream_t kernel_stream = nullptr) {
LinearAllocGuard<int> src_alloc(LinearAllocs::hipHostMalloc, kPageSize);
LinearAllocGuard<int> dst_alloc(LinearAllocs::hipHostMalloc, kPageSize);
MemcpySyncBehaviorCheck(std::bind(memcpy_func, dst_alloc.ptr(), src_alloc.ptr(), kPageSize),
should_sync, kernel_stream);
}
// Common negative tests
template <typename F> void MemcpyCommonNegativeTests(F f, void* dst, void* src, size_t count) {
SECTION("dst == nullptr") { HIP_CHECK_ERROR(f(nullptr, src, count), hipErrorInvalidValue); }