mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
level-zero v1.0 (3/N)
Implement residency functions Change-Id: I69179899f2a5fd627d10b976477a6736c600b430 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
418db08517
commit
b2b90c3daf
@ -19,7 +19,6 @@ set(L0_SRCS_API
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ze_image.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ze_memory.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ze_module.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ze_residency.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ze_sampler.cpp
|
||||
)
|
||||
set_property(GLOBAL PROPERTY L0_SRCS_API ${L0_SRCS_API})
|
||||
|
@ -120,7 +120,7 @@ zeContextMakeMemoryResident(
|
||||
ze_device_handle_t hDevice,
|
||||
void *ptr,
|
||||
size_t size) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
return L0::Context::fromHandle(hContext)->makeMemoryResident(hDevice, ptr, size);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
@ -129,7 +129,7 @@ zeContextEvictMemory(
|
||||
ze_device_handle_t hDevice,
|
||||
void *ptr,
|
||||
size_t size) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
return L0::Context::fromHandle(hContext)->evictMemory(hDevice, ptr, size);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
@ -137,7 +137,7 @@ zeContextMakeImageResident(
|
||||
ze_context_handle_t hContext,
|
||||
ze_device_handle_t hDevice,
|
||||
ze_image_handle_t hImage) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
return L0::Context::fromHandle(hContext)->makeImageResident(hDevice, hImage);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
@ -145,5 +145,5 @@ zeContextEvictImage(
|
||||
ze_context_handle_t hContext,
|
||||
ze_device_handle_t hDevice,
|
||||
ze_image_handle_t hImage) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
return L0::Context::fromHandle(hContext)->evictImage(hDevice, hImage);
|
||||
}
|
||||
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
#include <level_zero/ze_api.h>
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zeDeviceMakeMemoryResident(
|
||||
ze_device_handle_t hDevice,
|
||||
void *ptr,
|
||||
size_t size) {
|
||||
return L0::Device::fromHandle(hDevice)->makeMemoryResident(ptr, size);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zeDeviceEvictMemory(
|
||||
ze_device_handle_t hDevice,
|
||||
void *ptr,
|
||||
size_t size) {
|
||||
return L0::Device::fromHandle(hDevice)->evictMemory(ptr, size);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zeDeviceMakeImageResident(
|
||||
ze_device_handle_t hDevice,
|
||||
ze_image_handle_t hImage) {
|
||||
return L0::Device::fromHandle(hDevice)->makeImageResident(hImage);
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zeDeviceEvictImage(
|
||||
ze_device_handle_t hDevice,
|
||||
ze_image_handle_t hImage) {
|
||||
return L0::Device::fromHandle(hDevice)->evictImage(hImage);
|
||||
}
|
Reference in New Issue
Block a user