Revert "feature: support explicit memory locking"

This reverts commit 27a3307bb0.

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2024-03-25 15:43:50 +00:00
committed by Compute-Runtime-Automation
parent e44ac2a001
commit 068f6a25c6
48 changed files with 108 additions and 623 deletions

View File

@@ -7,9 +7,8 @@
target_sources(${L0_STATIC_LIB_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}context_imp_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/context_imp_${DRIVER_MODEL}/context_imp_${DRIVER_MODEL}.cpp
${CMAKE_CURRENT_SOURCE_DIR}/context_imp_${DRIVER_MODEL}${BRANCH_DIR_SUFFIX}context_imp_${DRIVER_MODEL}_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/context_imp_${DRIVER_MODEL}${BRANCH_DIR_SUFFIX}context_imp_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/context_imp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/context_imp.h
${CMAKE_CURRENT_SOURCE_DIR}/context.h

View File

@@ -162,7 +162,7 @@ struct Context : _ze_context_handle_t {
virtual ze_result_t getVirtualAddressSpaceIpcHandle(ze_device_handle_t hDevice,
ze_ipc_mem_handle_t *pIpcHandle) = 0;
virtual ze_result_t putVirtualAddressSpaceIpcHandle(ze_ipc_mem_handle_t ipcHandle) = 0;
virtual ze_result_t lockMemory(ze_device_handle_t hDevice, void *ptr, size_t size) = 0;
virtual bool isShareableMemory(const void *exportDesc, bool exportableMemory, NEO::Device *neoDevice) = 0;
virtual void *getMemHandlePtr(ze_device_handle_t hDevice, uint64_t handle, NEO::AllocationType allocationType, ze_ipc_memory_flags_t flags) = 0;

View File

@@ -471,9 +471,6 @@ ze_result_t ContextImp::makeMemoryResident(ze_device_handle_t hDevice, void *ptr
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
}
if (allocation->isLockedMemory()) {
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
}
NEO::MemoryOperationsHandler *memoryOperationsIface = neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get();
auto success = memoryOperationsIface->makeResident(neoDevice, ArrayRef<NEO::GraphicsAllocation *>(&allocation, 1));

View File

@@ -66,7 +66,6 @@ struct ContextImp : Context {
void **ptr) override;
ze_result_t getIpcHandleFromFd(uint64_t handle, ze_ipc_mem_handle_t *pIpcHandle) override;
ze_result_t getFdFromIpcHandle(ze_ipc_mem_handle_t ipcHandle, uint64_t *pHandle) override;
ze_result_t lockMemory(ze_device_handle_t hDevice, void *ptr, size_t size) override;
ze_result_t
getIpcMemHandles(

View File

@@ -1,18 +0,0 @@
/*
* Copyright (C) 2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/core/source/context/context_imp.h"
#include "level_zero/core/source/device/device.h"
#include "level_zero/core/source/driver/driver_handle_imp.h"
namespace L0 {
ze_result_t ContextImp::lockMemory(ze_device_handle_t device, void *ptr, size_t size) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
} // namespace L0

View File

@@ -18,5 +18,4 @@ ze_result_t ContextImp::getVirtualAddressSpaceIpcHandle(ze_device_handle_t hDevi
ze_result_t ContextImp::putVirtualAddressSpaceIpcHandle(ze_ipc_mem_handle_t ipcHandle) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
} // namespace L0