feature: update base layout of L0 handles to match ze_handle_t layout

this layout is required by L0 DDI Handle extension

Related-To: NEO-13121, NEO-13917
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-02-19 17:56:25 +00:00
committed by Compute-Runtime-Automation
parent 26ab3d89f0
commit 276c606329
49 changed files with 180 additions and 155 deletions

View File

@@ -90,7 +90,7 @@ void DriverImp::initialize(ze_result_t *result) {
}
if (*result != ZE_RESULT_SUCCESS) {
for (auto &driverHandle : *globalDriverHandles) {
delete driverHandle;
delete static_cast<BaseDriver *>(driverHandle);
}
globalDriverHandles->clear();
} else if (envVariables.pin) {

View File

@@ -10,18 +10,13 @@
#include "shared/source/helpers/non_copyable_or_moveable.h"
#include "level_zero/core/source/helpers/api_handle_helper.h"
#include <level_zero/ze_api.h>
#include <level_zero/zes_api.h>
#include <memory>
#include <string>
#include <vector>
struct _ze_driver_handle_t {
const uint64_t objMagic = objMagicValue;
static const zel_handle_type_t handleType = ZEL_HANDLE_DRIVER;
virtual ~_ze_driver_handle_t() = default;
};
struct _ze_driver_handle_t : BaseHandleWithLoaderTranslation<ZEL_HANDLE_DRIVER> {};
static_assert(IsCompliantWithDdiHandlesExt<_ze_driver_handle_t>);
namespace NEO {
class Device;
@@ -36,6 +31,7 @@ struct Device;
struct L0EnvVariables;
struct BaseDriver : _ze_driver_handle_t {
virtual ~BaseDriver() = default;
virtual ze_result_t getExtensionFunctionAddress(const char *pFuncName, void **pfunc) = 0;
static BaseDriver *fromHandle(ze_driver_handle_t handle) { return static_cast<BaseDriver *>(handle); }
};