SWDEV-1 - Add missing checks in hipMemoryAllocateCoherent.cc

[ROCm/hip commit: a0dfc6a2c8]
这个提交包含在:
Maneesh Gupta 编写, GitHub 于 2022-10-11 12:01:36 +05:30 提交
1 父节点 3db4c84176
当前提交 a04eeb66ff
1 个文件已更改
+3 -3
@@ -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<void *>(hostRes));
HIP_CHECK(hipHostFree(reinterpret_cast<void *>(hostRes)));
}