|
20 | 20 | #include "shared/source/helpers/string.h" |
21 | 21 | #include "shared/source/kernel/grf_config.h" |
22 | 22 | #include "shared/source/memory_manager/memory_manager.h" |
23 | | -#include "shared/source/memory_manager/memory_operations_handler.h" |
24 | 23 | #include "shared/source/os_interface/os_interface.h" |
25 | 24 | #include "shared/source/os_interface/os_time.h" |
26 | 25 | #include "shared/source/source_level_debugger/source_level_debugger.h" |
|
36 | 35 | #include "level_zero/core/source/driver/driver_handle_imp.h" |
37 | 36 | #include "level_zero/core/source/event/event.h" |
38 | 37 | #include "level_zero/core/source/image/image.h" |
39 | | -#include "level_zero/core/source/memory/memory_operations_helper.h" |
40 | 38 | #include "level_zero/core/source/module/module.h" |
41 | 39 | #include "level_zero/core/source/printf_handler/printf_handler.h" |
42 | 40 | #include "level_zero/core/source/sampler/sampler.h" |
@@ -214,23 +212,6 @@ ze_result_t DeviceImp::createModule(const ze_module_desc_t *desc, ze_module_hand |
214 | 212 | return ZE_RESULT_SUCCESS; |
215 | 213 | } |
216 | 214 |
|
217 | | -ze_result_t DeviceImp::evictImage(ze_image_handle_t hImage) { |
218 | | - auto alloc = Image::fromHandle(hImage)->getAllocation(); |
219 | | - NEO::MemoryOperationsHandler *memoryOperationsIface = neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get(); |
220 | | - auto success = memoryOperationsIface->evict(neoDevice, *alloc); |
221 | | - return changeMemoryOperationStatusToL0ResultType(success); |
222 | | -} |
223 | | - |
224 | | -ze_result_t DeviceImp::evictMemory(void *ptr, size_t size) { |
225 | | - auto alloc = getDriverHandle()->getSvmAllocsManager()->getSVMAlloc(ptr); |
226 | | - if (alloc == nullptr) { |
227 | | - return ZE_RESULT_ERROR_INVALID_ARGUMENT; |
228 | | - } |
229 | | - NEO::MemoryOperationsHandler *memoryOperationsIface = neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get(); |
230 | | - auto success = memoryOperationsIface->evict(neoDevice, *alloc->gpuAllocations.getGraphicsAllocation(getRootDeviceIndex())); |
231 | | - return changeMemoryOperationStatusToL0ResultType(success); |
232 | | -} |
233 | | - |
234 | 215 | ze_result_t DeviceImp::getComputeProperties(ze_device_compute_properties_t *pComputeProperties) { |
235 | 216 | const auto &deviceInfo = this->neoDevice->getDeviceInfo(); |
236 | 217 |
|
@@ -425,24 +406,6 @@ ze_result_t DeviceImp::getSubDevices(uint32_t *pCount, ze_device_handle_t *phSub |
425 | 406 | return ZE_RESULT_SUCCESS; |
426 | 407 | } |
427 | 408 |
|
428 | | -ze_result_t DeviceImp::makeImageResident(ze_image_handle_t hImage) { |
429 | | - auto alloc = Image::fromHandle(hImage)->getAllocation(); |
430 | | - NEO::MemoryOperationsHandler *memoryOperationsIface = neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get(); |
431 | | - auto success = memoryOperationsIface->makeResident(neoDevice, ArrayRef<NEO::GraphicsAllocation *>(&alloc, 1)); |
432 | | - return changeMemoryOperationStatusToL0ResultType(success); |
433 | | -} |
434 | | - |
435 | | -ze_result_t DeviceImp::makeMemoryResident(void *ptr, size_t size) { |
436 | | - auto alloc = getDriverHandle()->getSvmAllocsManager()->getSVMAlloc(ptr); |
437 | | - if (alloc == nullptr) { |
438 | | - return ZE_RESULT_ERROR_INVALID_ARGUMENT; |
439 | | - } |
440 | | - NEO::MemoryOperationsHandler *memoryOperationsIface = neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get(); |
441 | | - auto gpuAllocation = alloc->gpuAllocations.getGraphicsAllocation(getRootDeviceIndex()); |
442 | | - auto success = memoryOperationsIface->makeResident(neoDevice, ArrayRef<NEO::GraphicsAllocation *>(&gpuAllocation, 1)); |
443 | | - return changeMemoryOperationStatusToL0ResultType(success); |
444 | | -} |
445 | | - |
446 | 409 | ze_result_t DeviceImp::setIntermediateCacheConfig(ze_cache_config_flags_t cacheConfig) { |
447 | 410 | return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; |
448 | 411 | } |
|
0 commit comments