Quickfix for HCSWAP-60, support for hipHostMallocPortable

Change-Id: I2a4fcacea9d916ef222324fc9e9d8191f6dc12d0
这个提交包含在:
Rahul Garg 于 2016-10-20 10:44:30 +05:30 提交
1 父节点 d025ed980b
当前提交 b4702f3912
1 个文件已更改
+1 -1
+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;