P4 to Git Change 1815146 by cpaquot@cpaquot-ocl-lc-lnx on 2019/06/12 13:43:33

SWDEV-192333 - [HIP] Implemented hipExtMallocWithFlags and hipExtGetLinkTypeAndHopCount

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#16 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#18 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#59 edit
This commit is contained in:
foreman
2019-06-13 12:47:17 -04:00
parent 5c6b42efed
commit 752a4e57b6
4 changed files with 34 additions and 0 deletions
+11
View File
@@ -202,6 +202,17 @@ hipError_t ihipMemset(void* dst, int value, size_t valueSize, size_t sizeBytes,
return hipSuccess;
}
hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, unsigned int flags) {
HIP_INIT_API(ptr, sizeBytes, flags);
if (flags != hipDeviceMallocDefault &&
flags != hipDeviceMallocFinegrained) {
HIP_RETURN(hipErrorInvalidValue);
}
HIP_RETURN(ihipMalloc(ptr, sizeBytes, (flags & hipDeviceMallocFinegrained)? CL_MEM_SVM_FINE_GRAIN_BUFFER : 0));
}
hipError_t hipMalloc(void** ptr, size_t sizeBytes) {
HIP_INIT_API(ptr, sizeBytes);