From 1da044b273f9740134ad4fe6cb497c7a86835984 Mon Sep 17 00:00:00 2001 From: "Dittakavi, Satyanvesh" Date: Mon, 19 May 2025 15:18:27 +0530 Subject: [PATCH] SWDEV-1 - Fix hip on nvidia psdb failures (#185) --- catch/performance/memcpy/hipMemcpyWithKernel.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/catch/performance/memcpy/hipMemcpyWithKernel.cc b/catch/performance/memcpy/hipMemcpyWithKernel.cc index a6afd7050f..286f95b291 100644 --- a/catch/performance/memcpy/hipMemcpyWithKernel.cc +++ b/catch/performance/memcpy/hipMemcpyWithKernel.cc @@ -36,10 +36,12 @@ class MemcpyHtoDKernelDtoHv1AsyncBenchmark : public Benchmark(device_mem), host_mem, + size, stream)); int threads_num = 32; Sum<<>>(device_mem, count); - HIP_CHECK(hipMemcpyDtoHAsync(host_mem, (hipDeviceptr_t)device_mem, size, stream)); + HIP_CHECK(hipMemcpyDtoHAsync(host_mem, reinterpret_cast(device_mem), + size, stream)); HIP_CHECK(hipStreamSynchronize(stream)); } size_t sum = ((size_t*)host_mem)[0]; @@ -54,11 +56,11 @@ class MemcpyHtoDKernelDtoHv2AsyncBenchmark : public Benchmark>>(device_mem, count); - HIP_CHECK(hipMemcpyWithStream(host_mem, (hipDeviceptr_t)device_mem, size, + HIP_CHECK(hipMemcpyWithStream(host_mem, device_mem, size, hipMemcpyDeviceToHost, stream)); HIP_CHECK(hipStreamSynchronize(stream)); }