SWDEV-483134 - Remove hipExtHostAlloc API

Change-Id: I60777ef5c56b60dd8100d0d794ca10fb3b96a555
This commit is contained in:
Ioannis Assiouras
2024-12-16 12:02:56 +00:00
szülő 078fe7e5de
commit e8b2fdab96
8 fájl változott, egészen pontosan 8 új sor hozzáadva és 57 régi sor törölve
+5 -15
Fájl megtekintése
@@ -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();