SWDEV-483134 - Remove hipExtHostAlloc API

Change-Id: I60777ef5c56b60dd8100d0d794ca10fb3b96a555
This commit is contained in:
Ioannis Assiouras
2024-12-16 12:02:56 +00:00
parent 078fe7e5de
commit e8b2fdab96
8 changed files with 8 additions and 57 deletions
-1
View File
@@ -479,7 +479,6 @@ hipGraphNodeSetParams
hipGraphExecNodeSetParams
hipDrvGraphMemcpyNodeSetParams
hipDrvGraphMemcpyNodeGetParams
hipExtHostAlloc
hipStreamBatchMemOp
hipGraphAddBatchMemOpNode
hipGraphBatchMemOpNodeGetParams
+1 -2
View File
@@ -350,7 +350,6 @@ hipError_t hipHostFree(void* ptr);
hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags);
hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr);
hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags);
hipError_t hipExtHostAlloc(void** ptr, size_t size, unsigned int flags);
hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags);
hipError_t hipHostUnregister(void* hostPtr);
hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out,
@@ -1041,7 +1040,7 @@ void UpdateDispatchTable(HipDispatchTable* ptrDispatchTable) {
ptrDispatchTable->hipHostGetDevicePointer_fn = hip::hipHostGetDevicePointer;
ptrDispatchTable->hipHostGetFlags_fn = hip::hipHostGetFlags;
ptrDispatchTable->hipHostMalloc_fn = hip::hipHostMalloc;
ptrDispatchTable->hipExtHostAlloc_fn = hip::hipExtHostAlloc;
ptrDispatchTable->hipExtHostAlloc_fn = nullptr;
ptrDispatchTable->hipHostRegister_fn = hip::hipHostRegister;
ptrDispatchTable->hipHostUnregister_fn = hip::hipHostUnregister;
ptrDispatchTable->hipImportExternalMemory_fn = hip::hipImportExternalMemory;
+1 -8
View File
@@ -580,13 +580,6 @@ local:
*;
} hip_6.1;
hip_6.3 {
global:
hipExtHostAlloc;
local:
*;
} hip_6.2;
hip_6.4 {
global:
hipGraphAddBatchMemOpNode;
@@ -595,4 +588,4 @@ global:
hipGraphExecBatchMemOpNodeSetParams;
local:
*;
} hip_6.3;
} hip_6.2;
+5 -15
View File
@@ -385,7 +385,7 @@ hipError_t ihipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
}
*ptr = nullptr;
const unsigned int coherentFlags = hipExtHostAllocCoherent | hipExtHostAllocNonCoherent;
const unsigned int coherentFlags = hipHostMallocCoherent | hipHostMallocNonCoherent;
// can't have both Coherent and NonCoherent flags set at the same time
if ((flags & coherentFlags) == coherentFlags) {
@@ -398,16 +398,16 @@ hipError_t ihipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
unsigned int ihipFlags = CL_MEM_SVM_FINE_GRAIN_BUFFER;
if (flags == 0 ||
flags & (hipExtHostAllocCoherent | hipHostAllocMapped | hipExtHostAllocNumaUser) ||
(!(flags & hipExtHostAllocNonCoherent) && HIP_HOST_COHERENT)) {
flags & (hipHostMallocCoherent | hipHostMallocMapped | hipHostMallocNumaUser) ||
(!(flags & hipHostMallocNonCoherent) && HIP_HOST_COHERENT)) {
ihipFlags |= CL_MEM_SVM_ATOMICS;
}
if (flags & hipExtHostAllocNumaUser) {
if (flags & hipHostMallocNumaUser) {
ihipFlags |= CL_MEM_FOLLOW_USER_NUMA_POLICY;
}
if (flags & hipExtHostAllocNonCoherent) {
if (flags & hipHostMallocNonCoherent) {
ihipFlags &= ~CL_MEM_SVM_ATOMICS;
}
@@ -768,16 +768,6 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) {
HIP_RETURN_DURATION(status, ReturnPtrValue(ptr));
}
hipError_t hipExtHostAlloc(void** ptr, size_t sizeBytes, unsigned int flags) {
HIP_INIT_API(hipExtHostAlloc, ptr, sizeBytes, flags);
CHECK_STREAM_CAPTURE_SUPPORTED();
if (ptr == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipError_t status = ihipHostMalloc(ptr, sizeBytes, flags);
HIP_RETURN_DURATION(status, ReturnPtrValue(ptr));
}
hipError_t hipFree(void* ptr) {
HIP_INIT_API(hipFree, ptr);
CHECK_STREAM_CAPTURE_SUPPORTED();
-3
View File
@@ -1820,9 +1820,6 @@ hipError_t hipDrvGraphMemcpyNodeSetParams(hipGraphNode_t hNode, const HIP_MEMCPY
hipError_t hipGraphNodeSetParams(hipGraphNode_t node, hipGraphNodeParams *nodeParams) {
return hip::GetHipDispatchTable()->hipGraphNodeSetParams_fn(node, nodeParams);
}
hipError_t hipExtHostAlloc(void** ptr, size_t size, unsigned int flags) {
return hip::GetHipDispatchTable()->hipExtHostAlloc_fn(ptr, size, flags);
}
hipError_t hipGraphAddBatchMemOpNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
const hipGraphNode_t* dependencies, size_t numDependencies,
const hipBatchMemOpNodeParams* nodeParams) {