From a04eeb66ff9e365b362e0458680c79a37faaf3d9 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 11 Oct 2022 12:01:36 +0530 Subject: [PATCH] SWDEV-1 - Add missing checks in hipMemoryAllocateCoherent.cc [ROCm/hip commit: a0dfc6a2c80fb6bac20bce797db66bca210d909d] --- .../tests/catch/unit/memory/hipMemoryAllocateCoherent.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/hip/tests/catch/unit/memory/hipMemoryAllocateCoherent.cc b/projects/hip/tests/catch/unit/memory/hipMemoryAllocateCoherent.cc index 50747e275d..75c6c87b4e 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemoryAllocateCoherent.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemoryAllocateCoherent.cc @@ -44,8 +44,8 @@ __global__ void Kernel(float* hostRes, int clkRate) { TEST_CASE("Unit_hipHostMalloc_CoherentAccess") { int blocks = 2; float* hostRes; - hipHostMalloc(&hostRes, blocks * sizeof(float), - hipHostMallocMapped); + HIP_CHECK(hipHostMalloc(&hostRes, blocks * sizeof(float), + hipHostMallocMapped)); hostRes[0] = 0; hostRes[1] = 0; int clkRate; @@ -60,6 +60,6 @@ TEST_CASE("Unit_hipHostMalloc_CoherentAccess") { while (hostRes[eleCounter] == 0) {printf("waiting for counter inc\n");} eleCounter++; } - hipHostFree(reinterpret_cast(hostRes)); + HIP_CHECK(hipHostFree(reinterpret_cast(hostRes))); }