From eb8bcfaebeeb0572c5a9b480e6229a6fe229b60c Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Thu, 20 Oct 2016 10:44:30 +0530 Subject: [PATCH] Quickfix for HCSWAP-60, support for hipHostMallocPortable Change-Id: I2a4fcacea9d916ef222324fc9e9d8191f6dc12d0 [ROCm/hip commit: cd6eb7af786854d3917b1597be4beaa6d1934378] --- projects/hip/src/hip_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip/src/hip_memory.cpp b/projects/hip/src/hip_memory.cpp index 9e0473f02c..01f940a408 100644 --- a/projects/hip/src/hip_memory.cpp +++ b/projects/hip/src/hip_memory.cpp @@ -150,7 +150,7 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) if(ctx){ // am_alloc requires writeable __acc, perhaps could be refactored? auto device = ctx->getWriteableDevice(); - if(flags == hipHostMallocDefault){ + if((flags == hipHostMallocDefault)|| (flags == hipHostMallocPortable)){ *ptr = hc::am_alloc(sizeBytes, device->_acc, amHostPinned); if(sizeBytes < 1 && (*ptr == NULL)){ hip_status = hipErrorMemoryAllocation;