1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/core/source/device/device.h"
#include "level_zero/core/source/driver/driver.h"
#include "level_zero/core/source/driver/driver_handle.h"
#include <level_zero/ze_api.h>
#include <level_zero/ze_ddi.h>
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGet(
ze_driver_handle_t hDriver,
uint32_t *pCount,
ze_device_handle_t *phDevices) {
return L0::DriverHandle::fromHandle(hDriver)->getDevice(pCount, phDevices);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetSubDevices(
ze_device_handle_t hDevice,
uint32_t *pCount,
ze_device_handle_t *phSubdevices) {
return L0::Device::fromHandle(hDevice)->getSubDevices(pCount, phSubdevices);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetProperties(
ze_device_handle_t hDevice,
ze_device_properties_t *pDeviceProperties) {
return L0::Device::fromHandle(hDevice)->getProperties(pDeviceProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetComputeProperties(
ze_device_handle_t hDevice,
ze_device_compute_properties_t *pComputeProperties) {
return L0::Device::fromHandle(hDevice)->getComputeProperties(pComputeProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetModuleProperties(
ze_device_handle_t hDevice,
ze_device_module_properties_t *pKernelProperties) {
return L0::Device::fromHandle(hDevice)->getKernelProperties(pKernelProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetMemoryProperties(
ze_device_handle_t hDevice,
uint32_t *pCount,
ze_device_memory_properties_t *pMemProperties) {
return L0::Device::fromHandle(hDevice)->getMemoryProperties(pCount, pMemProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetMemoryAccessProperties(
ze_device_handle_t hDevice,
ze_device_memory_access_properties_t *pMemAccessProperties) {
return L0::Device::fromHandle(hDevice)->getMemoryAccessProperties(pMemAccessProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetCacheProperties(
ze_device_handle_t hDevice,
uint32_t *pCount,
ze_device_cache_properties_t *pCacheProperties) {
return L0::Device::fromHandle(hDevice)->getCacheProperties(pCount, pCacheProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetImageProperties(
ze_device_handle_t hDevice,
ze_device_image_properties_t *pImageProperties) {
return L0::Device::fromHandle(hDevice)->getDeviceImageProperties(pImageProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetP2PProperties(
ze_device_handle_t hDevice,
ze_device_handle_t hPeerDevice,
ze_device_p2p_properties_t *pP2PProperties) {
return L0::Device::fromHandle(hDevice)->getP2PProperties(hPeerDevice, pP2PProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceCanAccessPeer(
ze_device_handle_t hDevice,
ze_device_handle_t hPeerDevice,
ze_bool_t *value) {
return L0::Device::fromHandle(hDevice)->canAccessPeer(hPeerDevice, value);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceSetLastLevelCacheConfig(
ze_device_handle_t hDevice,
ze_cache_config_flags_t cacheConfig) {
return L0::Device::fromHandle(hDevice)->setLastLevelCacheConfig(cacheConfig);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetCommandQueueGroupProperties(
ze_device_handle_t hDevice,
uint32_t *pCount,
ze_command_queue_group_properties_t *pCommandQueueGroupProperties) {
return L0::Device::fromHandle(hDevice)->getCommandQueueGroupProperties(pCount, pCommandQueueGroupProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetExternalMemoryProperties(
ze_device_handle_t hDevice,
ze_device_external_memory_properties_t *pExternalMemoryProperties) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetStatus(
ze_device_handle_t hDevice) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
|