Quickfix for HCSWAP-60, support for hipHostMallocPortable

Change-Id: I2a4fcacea9d916ef222324fc9e9d8191f6dc12d0
Этот коммит содержится в:
Rahul Garg
2016-10-20 10:44:30 +05:30
родитель d025ed980b
Коммит b4702f3912
+1 -1
Просмотреть файл
@@ -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;