Quickfix for HCSWAP-60, support for hipHostMallocPortable

Change-Id: I2a4fcacea9d916ef222324fc9e9d8191f6dc12d0


[ROCm/hip commit: cd6eb7af78]
This commit is contained in:
Rahul Garg
2016-10-20 10:44:30 +05:30
parent 67ebfde50e
commit eb8bcfaebe
+1 -1
View File
@@ -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;