Skip to content

Commit

Permalink
L0 Loader updated with v1.7 L0 Spec
Browse files Browse the repository at this point in the history
Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Jul 13, 2023
1 parent 8c8a4d6 commit 5d1d2d5
Show file tree
Hide file tree
Showing 36 changed files with 7,777 additions and 69 deletions.
422 changes: 422 additions & 0 deletions include/layers/zel_tracing_register_cb.h

Large diffs are not rendered by default.

831 changes: 818 additions & 13 deletions include/ze.py

Large diffs are not rendered by default.

1,186 changes: 1,170 additions & 16 deletions include/ze_api.h

Large diffs are not rendered by default.

199 changes: 198 additions & 1 deletion include/ze_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file ze_ddi.h
* @version v1.6-r1.6.10
* @version v1.7-r1.7.0
*
*/
#ifndef _ZE_DDI_H
Expand All @@ -19,6 +19,133 @@
extern "C" {
#endif

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASBuilderCreateExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderCreateExp_t)(
ze_driver_handle_t,
const ze_rtas_builder_exp_desc_t*,
ze_rtas_builder_exp_handle_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASBuilderGetBuildPropertiesExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderGetBuildPropertiesExp_t)(
ze_rtas_builder_exp_handle_t,
const ze_rtas_builder_build_op_exp_desc_t*,
ze_rtas_builder_exp_properties_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASBuilderBuildExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderBuildExp_t)(
ze_rtas_builder_exp_handle_t,
const ze_rtas_builder_build_op_exp_desc_t*,
void*,
size_t,
void*,
size_t,
ze_rtas_parallel_operation_exp_handle_t,
void*,
ze_rtas_aabb_exp_t*,
size_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASBuilderDestroyExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASBuilderDestroyExp_t)(
ze_rtas_builder_exp_handle_t
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Table of RTASBuilderExp functions pointers
typedef struct _ze_rtas_builder_exp_dditable_t
{
ze_pfnRTASBuilderCreateExp_t pfnCreateExp;
ze_pfnRTASBuilderGetBuildPropertiesExp_t pfnGetBuildPropertiesExp;
ze_pfnRTASBuilderBuildExp_t pfnBuildExp;
ze_pfnRTASBuilderDestroyExp_t pfnDestroyExp;
} ze_rtas_builder_exp_dditable_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's RTASBuilderExp table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zeGetRTASBuilderExpProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
ze_rtas_builder_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeGetRTASBuilderExpProcAddrTable
typedef ze_result_t (ZE_APICALL *ze_pfnGetRTASBuilderExpProcAddrTable_t)(
ze_api_version_t,
ze_rtas_builder_exp_dditable_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASParallelOperationCreateExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationCreateExp_t)(
ze_driver_handle_t,
ze_rtas_parallel_operation_exp_handle_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASParallelOperationGetPropertiesExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationGetPropertiesExp_t)(
ze_rtas_parallel_operation_exp_handle_t,
ze_rtas_parallel_operation_exp_properties_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASParallelOperationJoinExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationJoinExp_t)(
ze_rtas_parallel_operation_exp_handle_t
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeRTASParallelOperationDestroyExp
typedef ze_result_t (ZE_APICALL *ze_pfnRTASParallelOperationDestroyExp_t)(
ze_rtas_parallel_operation_exp_handle_t
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Table of RTASParallelOperationExp functions pointers
typedef struct _ze_rtas_parallel_operation_exp_dditable_t
{
ze_pfnRTASParallelOperationCreateExp_t pfnCreateExp;
ze_pfnRTASParallelOperationGetPropertiesExp_t pfnGetPropertiesExp;
ze_pfnRTASParallelOperationJoinExp_t pfnJoinExp;
ze_pfnRTASParallelOperationDestroyExp_t pfnDestroyExp;
} ze_rtas_parallel_operation_exp_dditable_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's RTASParallelOperationExp table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zeGetRTASParallelOperationExpProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
ze_rtas_parallel_operation_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeGetRTASParallelOperationExpProcAddrTable
typedef ze_result_t (ZE_APICALL *ze_pfnGetRTASParallelOperationExpProcAddrTable_t)(
ze_api_version_t,
ze_rtas_parallel_operation_exp_dditable_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeInit
typedef ze_result_t (ZE_APICALL *ze_pfnInit_t)(
Expand Down Expand Up @@ -140,6 +267,43 @@ typedef ze_result_t (ZE_APICALL *ze_pfnGetDriverProcAddrTable_t)(
ze_driver_dditable_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeDriverRTASFormatCompatibilityCheckExp
typedef ze_result_t (ZE_APICALL *ze_pfnDriverRTASFormatCompatibilityCheckExp_t)(
ze_driver_handle_t,
ze_rtas_format_exp_t,
ze_rtas_format_exp_t
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Table of DriverExp functions pointers
typedef struct _ze_driver_exp_dditable_t
{
ze_pfnDriverRTASFormatCompatibilityCheckExp_t pfnRTASFormatCompatibilityCheckExp;
} ze_driver_exp_dditable_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Exported function for filling application's DriverExp table
/// with current process' addresses
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION
ZE_DLLEXPORT ze_result_t ZE_APICALL
zeGetDriverExpProcAddrTable(
ze_api_version_t version, ///< [in] API version requested
ze_driver_exp_dditable_t* pDdiTable ///< [in,out] pointer to table of DDI function pointers
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeGetDriverExpProcAddrTable
typedef ze_result_t (ZE_APICALL *ze_pfnGetDriverExpProcAddrTable_t)(
ze_api_version_t,
ze_driver_exp_dditable_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeDeviceGet
typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGet_t)(
Expand Down Expand Up @@ -276,6 +440,13 @@ typedef ze_result_t (ZE_APICALL *ze_pfnDevicePciGetPropertiesExt_t)(
ze_pci_ext_properties_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeDeviceGetRootDevice
typedef ze_result_t (ZE_APICALL *ze_pfnDeviceGetRootDevice_t)(
ze_device_handle_t,
ze_device_handle_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Table of Device functions pointers
typedef struct _ze_device_dditable_t
Expand All @@ -298,6 +469,7 @@ typedef struct _ze_device_dditable_t
ze_pfnDeviceReserveCacheExt_t pfnReserveCacheExt;
ze_pfnDeviceSetCacheAdviceExt_t pfnSetCacheAdviceExt;
ze_pfnDevicePciGetPropertiesExt_t pfnPciGetPropertiesExt;
ze_pfnDeviceGetRootDevice_t pfnGetRootDevice;
} ze_device_dditable_t;

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1863,12 +2035,34 @@ typedef ze_result_t (ZE_APICALL *ze_pfnMemGetFileDescriptorFromIpcHandleExp_t)(
uint64_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeMemSetAtomicAccessAttributeExp
typedef ze_result_t (ZE_APICALL *ze_pfnMemSetAtomicAccessAttributeExp_t)(
ze_context_handle_t,
ze_device_handle_t,
const void*,
size_t,
ze_memory_atomic_attr_exp_flags_t
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Function-pointer for zeMemGetAtomicAccessAttributeExp
typedef ze_result_t (ZE_APICALL *ze_pfnMemGetAtomicAccessAttributeExp_t)(
ze_context_handle_t,
ze_device_handle_t,
const void*,
size_t,
ze_memory_atomic_attr_exp_flags_t*
);

///////////////////////////////////////////////////////////////////////////////
/// @brief Table of MemExp functions pointers
typedef struct _ze_mem_exp_dditable_t
{
ze_pfnMemGetIpcHandleFromFileDescriptorExp_t pfnGetIpcHandleFromFileDescriptorExp;
ze_pfnMemGetFileDescriptorFromIpcHandleExp_t pfnGetFileDescriptorFromIpcHandleExp;
ze_pfnMemSetAtomicAccessAttributeExp_t pfnSetAtomicAccessAttributeExp;
ze_pfnMemGetAtomicAccessAttributeExp_t pfnGetAtomicAccessAttributeExp;
} ze_mem_exp_dditable_t;

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -2113,8 +2307,11 @@ typedef ze_result_t (ZE_APICALL *ze_pfnGetFabricEdgeExpProcAddrTable_t)(
/// @brief Container for all DDI tables
typedef struct _ze_dditable_t
{
ze_rtas_builder_exp_dditable_t RTASBuilderExp;
ze_rtas_parallel_operation_exp_dditable_t RTASParallelOperationExp;
ze_global_dditable_t Global;
ze_driver_dditable_t Driver;
ze_driver_exp_dditable_t DriverExp;
ze_device_dditable_t Device;
ze_device_exp_dditable_t DeviceExp;
ze_context_dditable_t Context;
Expand Down
Loading

0 comments on commit 5d1d2d5

Please # to comment.