Skip to content

Commit

Permalink
Update to spec 1.6
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
  • Loading branch information
bmyates committed Apr 7, 2023
1 parent 79f1c52 commit 0d56d8e
Show file tree
Hide file tree
Showing 33 changed files with 4,191 additions and 214 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Level zero loader changelog

## v1.10.0
* Update to spec 1.6
* Added validation for stype and pnext


## v1.9.9
* Update to spec 1.5.17
* Fix for calling zeInit in zesInit path
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()

# This project follows semantic versioning (https://semver.org/). Only set the
# major and minor version here - patch version is determined dynamically.
project(level-zero VERSION 1.9)
project(level-zero VERSION 1.10)

# Patch version corresponds to # of commits on master since last version
# major/minor tag (e.g., v1.0). If not building in a git repository, then get
Expand Down
242 changes: 242 additions & 0 deletions include/layers/zel_tracing_register_cb.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ typedef void (ZE_APICALL *ze_pfnDriverGetExtensionFunctionAddressCb_t)(
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeDriverGetLastErrorDescription
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_driver_get_last_error_description_params_t
{
ze_driver_handle_t* phDriver;
const char*** pppString;
} ze_driver_get_last_error_description_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeDriverGetLastErrorDescription
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnDriverGetLastErrorDescriptionCb_t)(
ze_driver_get_last_error_description_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeDeviceGetGlobalTimestamps
/// @details Each entry is a pointer to the parameter passed to the function;
Expand Down Expand Up @@ -283,6 +309,32 @@ typedef void (ZE_APICALL *ze_pfnCommandListAppendImageCopyFromMemoryExtCb_t)(
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeCommandListHostSynchronize
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_command_list_host_synchronize_params_t
{
ze_command_list_handle_t* phCommandList;
uint64_t* ptimeout;
} ze_command_list_host_synchronize_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeCommandListHostSynchronize
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnCommandListHostSynchronizeCb_t)(
ze_command_list_host_synchronize_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeEventQueryTimestampsExp
/// @details Each entry is a pointer to the parameter passed to the function;
Expand Down Expand Up @@ -311,6 +363,60 @@ typedef void (ZE_APICALL *ze_pfnEventQueryTimestampsExpCb_t)(
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeEventQueryKernelTimestampsExt
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_event_query_kernel_timestamps_ext_params_t
{
ze_event_handle_t* phEvent;
ze_device_handle_t* phDevice;
uint32_t** ppCount;
ze_event_query_kernel_timestamps_results_ext_properties_t** ppResults;
} ze_event_query_kernel_timestamps_ext_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeEventQueryKernelTimestampsExt
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnEventQueryKernelTimestampsExtCb_t)(
ze_event_query_kernel_timestamps_ext_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeEventPoolPutIpcHandle
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_event_pool_put_ipc_handle_params_t
{
ze_context_handle_t* phContext;
ze_ipc_event_pool_handle_t* phIpc;
} ze_event_pool_put_ipc_handle_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeEventPoolPutIpcHandle
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnEventPoolPutIpcHandleCb_t)(
ze_event_pool_put_ipc_handle_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeImageGetMemoryPropertiesExp
/// @details Each entry is a pointer to the parameter passed to the function;
Expand Down Expand Up @@ -503,6 +609,86 @@ typedef void (ZE_APICALL *ze_pfnMemFreeExtCb_t)(
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeMemGetIpcHandleFromFileDescriptorExp
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_mem_get_ipc_handle_from_file_descriptor_exp_params_t
{
ze_context_handle_t* phContext;
uint64_t* phandle;
ze_ipc_mem_handle_t** ppIpcHandle;
} ze_mem_get_ipc_handle_from_file_descriptor_exp_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeMemGetIpcHandleFromFileDescriptorExp
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnMemGetIpcHandleFromFileDescriptorExpCb_t)(
ze_mem_get_ipc_handle_from_file_descriptor_exp_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeMemGetFileDescriptorFromIpcHandleExp
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_mem_get_file_descriptor_from_ipc_handle_exp_params_t
{
ze_context_handle_t* phContext;
ze_ipc_mem_handle_t* pipcHandle;
uint64_t** ppHandle;
} ze_mem_get_file_descriptor_from_ipc_handle_exp_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeMemGetFileDescriptorFromIpcHandleExp
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnMemGetFileDescriptorFromIpcHandleExpCb_t)(
ze_mem_get_file_descriptor_from_ipc_handle_exp_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeMemPutIpcHandle
/// @details Each entry is a pointer to the parameter passed to the function;
/// allowing the callback the ability to modify the parameter's value

typedef struct _ze_mem_put_ipc_handle_params_t
{
ze_context_handle_t* phContext;
ze_ipc_mem_handle_t* phandle;
} ze_mem_put_ipc_handle_params_t;


///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function-pointer for zeMemPutIpcHandle
/// @param[in] params Parameters passed to this instance
/// @param[in] result Return value
/// @param[in] pTracerUserData Per-Tracer user data
/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data

typedef void (ZE_APICALL *ze_pfnMemPutIpcHandleCb_t)(
ze_mem_put_ipc_handle_params_t* params,
ze_result_t result,
void* pTracerUserData,
void** ppTracerInstanceUserData
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Callback function parameters for zeModuleInspectLinkageExt
/// @details Each entry is a pointer to the parameter passed to the function;
Expand Down Expand Up @@ -783,6 +969,14 @@ zelTracerDriverGetExtensionFunctionAddressRegisterCallback(
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerDriverGetLastErrorDescriptionRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnDriverGetLastErrorDescriptionCb_t pfnGetLastErrorDescriptionCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerDeviceGetRegisterCallback(
zel_tracer_handle_t hTracer,
Expand Down Expand Up @@ -1015,6 +1209,14 @@ zelTracerCommandListAppendWriteGlobalTimestampRegisterCallback(
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerCommandListHostSynchronizeRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnCommandListHostSynchronizeCb_t pfnHostSynchronizeCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerCommandListAppendBarrierRegisterCallback(
zel_tracer_handle_t hTracer,
Expand Down Expand Up @@ -1159,6 +1361,14 @@ zelTracerEventPoolGetIpcHandleRegisterCallback(
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerEventPoolPutIpcHandleRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnEventPoolPutIpcHandleCb_t pfnPutIpcHandleCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerEventPoolOpenIpcHandleRegisterCallback(
zel_tracer_handle_t hTracer,
Expand Down Expand Up @@ -1367,6 +1577,30 @@ zelTracerMemGetIpcHandleRegisterCallback(
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerMemGetIpcHandleFromFileDescriptorExpRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnMemGetIpcHandleFromFileDescriptorExpCb_t pfnGetIpcHandleFromFileDescriptorExpCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerMemGetFileDescriptorFromIpcHandleExpRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnMemGetFileDescriptorFromIpcHandleExpCb_t pfnGetFileDescriptorFromIpcHandleExpCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerMemPutIpcHandleRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnMemPutIpcHandleCb_t pfnPutIpcHandleCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerMemOpenIpcHandleRegisterCallback(
zel_tracer_handle_t hTracer,
Expand Down Expand Up @@ -1887,6 +2121,14 @@ zelTracerFabricEdgeGetPropertiesExpRegisterCallback(
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerEventQueryKernelTimestampsExtRegisterCallback(
zel_tracer_handle_t hTracer,
zel_tracer_reg_t callback_type,
ze_pfnEventQueryKernelTimestampsExtCb_t pfnQueryKernelTimestampsExtCb
);


ZE_APIEXPORT ze_result_t ZE_APICALL
zelTracerResetAllCallbacks(zel_tracer_handle_t hTracer);

Expand Down
Loading

0 comments on commit 0d56d8e

Please # to comment.