SWDEV-483134 - Remove hipExtHostAlloc API

Change-Id: I60777ef5c56b60dd8100d0d794ca10fb3b96a555


[ROCm/clr commit: e8b2fdab96]
This commit is contained in:
Ioannis Assiouras committed 2024-12-16 17:13:49 -05:00
1 parent 17c7b3b270
commit 2c8805e536
8 files changed
+8 -57

No files matched your search

+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();