Skip to content

Commit

Permalink
Add missing stypes and fix some topology api param names
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 May 18, 2022
1 parent 12602d7 commit 108c4de
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 65 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Level zero loader changelog


## v1.8.1
*Add missing sTypes
*Fix argument names in some exp APIs

## v1.8.0
* Add Support for L0 Spec v1.4 which includes
* Core Fabric Topology API
Expand Down
6 changes: 3 additions & 3 deletions include/layers/zel_tracing_register_cb.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ typedef void (ZE_APICALL *ze_pfnDevicePciGetPropertiesExtCb_t)(

typedef struct _ze_device_get_fabric_vertex_exp_params_t
{
ze_device_handle_t* phVertex;
ze_fabric_vertex_handle_t** ppVertex;
ze_device_handle_t* phDevice;
ze_fabric_vertex_handle_t** pphVertex;
} ze_device_get_fabric_vertex_exp_params_t;


Expand Down Expand Up @@ -671,7 +671,7 @@ typedef void (ZE_APICALL *ze_pfnFabricVertexGetPropertiesExpCb_t)(
typedef struct _ze_fabric_vertex_get_device_exp_params_t
{
ze_fabric_vertex_handle_t* phVertex;
ze_device_handle_t** ppDevice;
ze_device_handle_t** pphDevice;
} ze_fabric_vertex_get_device_exp_params_t;


Expand Down
6 changes: 4 additions & 2 deletions include/ze.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: MIT
@file ze.py
@version v1.4-r1.4.0
@version v1.4-r1.4.1
"""
import platform
Expand Down Expand Up @@ -280,7 +280,9 @@ class ze_structure_type_v(IntEnum):
IMAGE_MEMORY_EXP_PROPERTIES = 0x00020007 ## ::ze_image_memory_properties_exp_t
POWER_SAVING_HINT_EXP_DESC = 0x00020008 ## ::ze_context_power_saving_hint_exp_desc_t
COPY_BANDWIDTH_EXP_PROPERTIES = 0x00020009 ## ::ze_copy_bandwidth_exp_properties_t
DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x00020010## ::ze_device_p2p_bandwidth_exp_properties_t
DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x0002000A## ::ze_device_p2p_bandwidth_exp_properties_t
FABRIC_VERTEX_EXP_PROPERTIES = 0x0002000B ## ::ze_fabric_vertex_exp_properties_t
FABRIC_EDGE_EXP_PROPERTIES = 0x0002000C ## ::ze_fabric_edge_exp_properties_t

class ze_structure_type_t(c_int):
def __str__(self):
Expand Down
18 changes: 10 additions & 8 deletions include/ze_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file ze_api.h
* @version v1.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZE_API_H
Expand Down Expand Up @@ -309,7 +309,9 @@ typedef enum _ze_structure_type_t
ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES = 0x00020007, ///< ::ze_image_memory_properties_exp_t
ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC = 0x00020008, ///< ::ze_context_power_saving_hint_exp_desc_t
ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES = 0x00020009, ///< ::ze_copy_bandwidth_exp_properties_t
ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x00020010, ///< ::ze_device_p2p_bandwidth_exp_properties_t
ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES = 0x0002000A, ///< ::ze_device_p2p_bandwidth_exp_properties_t
ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES = 0x0002000B,///< ::ze_fabric_vertex_exp_properties_t
ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES = 0x0002000C, ///< ::ze_fabric_edge_exp_properties_t
ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff

} ze_structure_type_t;
Expand Down Expand Up @@ -7866,15 +7868,15 @@ zeFabricVertexGetPropertiesExp(
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hVertex`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pDevice`
/// + `nullptr == phDevice`
/// - ::ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE
/// + Provided fabric vertex handle does not correspond to a device or subdevice.
/// - ::ZE_RESULT_EXP_ERROR_REMOTE_DEVICE
/// + Provided fabric vertex handle corresponds to remote device or subdevice.
ZE_APIEXPORT ze_result_t ZE_APICALL
zeFabricVertexGetDeviceExp(
ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex
ze_device_handle_t* pDevice ///< [out] device handle corresponding to fabric vertex
ze_device_handle_t* phDevice ///< [out] device handle corresponding to fabric vertex
);

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -7889,15 +7891,15 @@ zeFabricVertexGetDeviceExp(
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hVertex`
/// + `nullptr == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pVertex`
/// + `nullptr == phVertex`
/// - ::ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX
/// + Provided device handle does not correspond to a fabric vertex.
ZE_APIEXPORT ze_result_t ZE_APICALL
zeDeviceGetFabricVertexExp(
ze_device_handle_t hVertex, ///< [in] handle of the device
ze_fabric_vertex_handle_t* pVertex ///< [out] fabric vertex handle corresponding to device
ze_device_handle_t hDevice, ///< [in] handle of the device
ze_fabric_vertex_handle_t* phVertex ///< [out] fabric vertex handle corresponding to device
);

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 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.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZE_DDI_H
Expand Down
6 changes: 5 additions & 1 deletion include/zes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: MIT
@file zes.py
@version v1.4-r1.4.0
@version v1.4-r1.4.1
"""
import platform
Expand Down Expand Up @@ -138,6 +138,10 @@ class zes_structure_type_v(IntEnum):
RAS_STATE = 0x22 ## ::zes_ras_state_t
TEMP_CONFIG = 0x23 ## ::zes_temp_config_t
PCI_BAR_PROPERTIES_1_2 = 0x24 ## ::zes_pci_bar_properties_1_2_t
DEVICE_ECC_DESC = 0x25 ## ::zes_device_ecc_desc_t
DEVICE_ECC_PROPERTIES = 0x26 ## ::zes_device_ecc_properties_t
POWER_LIMIT_EXT_DESC = 0x27 ## ::zes_power_limit_ext_desc_t
POWER_EXT_PROPERTIES = 0x28 ## ::zes_power_ext_properties_t

class zes_structure_type_t(c_int):
def __str__(self):
Expand Down
6 changes: 5 additions & 1 deletion include/zes_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zes_api.h
* @version v1.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZES_API_H
Expand Down Expand Up @@ -133,6 +133,10 @@ typedef enum _zes_structure_type_t
ZES_STRUCTURE_TYPE_RAS_STATE = 0x22, ///< ::zes_ras_state_t
ZES_STRUCTURE_TYPE_TEMP_CONFIG = 0x23, ///< ::zes_temp_config_t
ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2 = 0x24, ///< ::zes_pci_bar_properties_1_2_t
ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC = 0x25, ///< ::zes_device_ecc_desc_t
ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES = 0x26,///< ::zes_device_ecc_properties_t
ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC = 0x27, ///< ::zes_power_limit_ext_desc_t
ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES = 0x28, ///< ::zes_power_ext_properties_t
ZES_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff

} zes_structure_type_t;
Expand Down
2 changes: 1 addition & 1 deletion include/zes_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zes_ddi.h
* @version v1.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZES_DDI_H
Expand Down
2 changes: 1 addition & 1 deletion include/zet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPDX-License-Identifier: MIT
@file zet.py
@version v1.4-r1.4.0
@version v1.4-r1.4.1
"""
import platform
Expand Down
2 changes: 1 addition & 1 deletion include/zet_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zet_api.h
* @version v1.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZET_API_H
Expand Down
2 changes: 1 addition & 1 deletion include/zet_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: MIT
*
* @file zet_ddi.h
* @version v1.4-r1.4.0
* @version v1.4-r1.4.1
*
*/
#ifndef _ZET_DDI_H
Expand Down
14 changes: 7 additions & 7 deletions source/drivers/null/ze_nullddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3796,7 +3796,7 @@ namespace driver
__zedlllocal ze_result_t ZE_APICALL
zeFabricVertexGetDeviceExp(
ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex
ze_device_handle_t* pDevice ///< [out] device handle corresponding to fabric vertex
ze_device_handle_t* phDevice ///< [out] device handle corresponding to fabric vertex
)
{
ze_result_t result = ZE_RESULT_SUCCESS;
Expand All @@ -3805,12 +3805,12 @@ namespace driver
auto pfnGetDeviceExp = context.zeDdiTable.FabricVertexExp.pfnGetDeviceExp;
if( nullptr != pfnGetDeviceExp )
{
result = pfnGetDeviceExp( hVertex, pDevice );
result = pfnGetDeviceExp( hVertex, phDevice );
}
else
{
// generic implementation
*pDevice = reinterpret_cast<ze_device_handle_t>( context.get() );
*phDevice = reinterpret_cast<ze_device_handle_t>( context.get() );

}

Expand All @@ -3821,8 +3821,8 @@ namespace driver
/// @brief Intercept function for zeDeviceGetFabricVertexExp
__zedlllocal ze_result_t ZE_APICALL
zeDeviceGetFabricVertexExp(
ze_device_handle_t hVertex, ///< [in] handle of the device
ze_fabric_vertex_handle_t* pVertex ///< [out] fabric vertex handle corresponding to device
ze_device_handle_t hDevice, ///< [in] handle of the device
ze_fabric_vertex_handle_t* phVertex ///< [out] fabric vertex handle corresponding to device
)
{
ze_result_t result = ZE_RESULT_SUCCESS;
Expand All @@ -3831,12 +3831,12 @@ namespace driver
auto pfnGetFabricVertexExp = context.zeDdiTable.DeviceExp.pfnGetFabricVertexExp;
if( nullptr != pfnGetFabricVertexExp )
{
result = pfnGetFabricVertexExp( hVertex, pVertex );
result = pfnGetFabricVertexExp( hDevice, phVertex );
}
else
{
// generic implementation
*pVertex = reinterpret_cast<ze_fabric_vertex_handle_t>( context.get() );
*phVertex = reinterpret_cast<ze_fabric_vertex_handle_t>( context.get() );

}

Expand Down
22 changes: 11 additions & 11 deletions source/layers/tracing/ze_trcddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5645,20 +5645,20 @@ namespace tracing_layer
__zedlllocal ze_result_t ZE_APICALL
zeFabricVertexGetDeviceExp(
ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex
ze_device_handle_t* pDevice ///< [out] device handle corresponding to fabric vertex
ze_device_handle_t* phDevice ///< [out] device handle corresponding to fabric vertex
)
{
auto pfnGetDeviceExp = context.zeDdiTable.FabricVertexExp.pfnGetDeviceExp;

if( nullptr == pfnGetDeviceExp)
return ZE_RESULT_ERROR_UNINITIALIZED;

ZE_HANDLE_TRACER_RECURSION(context.zeDdiTable.FabricVertexExp.pfnGetDeviceExp, hVertex, pDevice);
ZE_HANDLE_TRACER_RECURSION(context.zeDdiTable.FabricVertexExp.pfnGetDeviceExp, hVertex, phDevice);

// capture parameters
ze_fabric_vertex_get_device_exp_params_t tracerParams = {
&hVertex,
&pDevice
&phDevice
};

tracing_layer::APITracerCallbackDataImp<ze_pfnFabricVertexGetDeviceExpCb_t> apiCallbackData;
Expand All @@ -5672,28 +5672,28 @@ namespace tracing_layer
apiCallbackData.prologCallbacks,
apiCallbackData.epilogCallbacks,
*tracerParams.phVertex,
*tracerParams.ppDevice);
*tracerParams.pphDevice);
}

///////////////////////////////////////////////////////////////////////////////
/// @brief Intercept function for zeDeviceGetFabricVertexExp
__zedlllocal ze_result_t ZE_APICALL
zeDeviceGetFabricVertexExp(
ze_device_handle_t hVertex, ///< [in] handle of the device
ze_fabric_vertex_handle_t* pVertex ///< [out] fabric vertex handle corresponding to device
ze_device_handle_t hDevice, ///< [in] handle of the device
ze_fabric_vertex_handle_t* phVertex ///< [out] fabric vertex handle corresponding to device
)
{
auto pfnGetFabricVertexExp = context.zeDdiTable.DeviceExp.pfnGetFabricVertexExp;

if( nullptr == pfnGetFabricVertexExp)
return ZE_RESULT_ERROR_UNINITIALIZED;

ZE_HANDLE_TRACER_RECURSION(context.zeDdiTable.DeviceExp.pfnGetFabricVertexExp, hVertex, pVertex);
ZE_HANDLE_TRACER_RECURSION(context.zeDdiTable.DeviceExp.pfnGetFabricVertexExp, hDevice, phVertex);

// capture parameters
ze_device_get_fabric_vertex_exp_params_t tracerParams = {
&hVertex,
&pVertex
&hDevice,
&phVertex
};

tracing_layer::APITracerCallbackDataImp<ze_pfnDeviceGetFabricVertexExpCb_t> apiCallbackData;
Expand All @@ -5706,8 +5706,8 @@ namespace tracing_layer
apiCallbackData.apiOrdinal,
apiCallbackData.prologCallbacks,
apiCallbackData.epilogCallbacks,
*tracerParams.phVertex,
*tracerParams.ppVertex);
*tracerParams.phDevice,
*tracerParams.pphVertex);
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
16 changes: 8 additions & 8 deletions source/layers/validation/ze_valddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4359,7 +4359,7 @@ namespace validation_layer
__zedlllocal ze_result_t ZE_APICALL
zeFabricVertexGetDeviceExp(
ze_fabric_vertex_handle_t hVertex, ///< [in] handle of the fabric vertex
ze_device_handle_t* pDevice ///< [out] device handle corresponding to fabric vertex
ze_device_handle_t* phDevice ///< [out] device handle corresponding to fabric vertex
)
{
auto pfnGetDeviceExp = context.zeDdiTable.FabricVertexExp.pfnGetDeviceExp;
Expand All @@ -4372,20 +4372,20 @@ namespace validation_layer
if( nullptr == hVertex )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;

if( nullptr == pDevice )
if( nullptr == phDevice )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;

}

return pfnGetDeviceExp( hVertex, pDevice );
return pfnGetDeviceExp( hVertex, phDevice );
}

///////////////////////////////////////////////////////////////////////////////
/// @brief Intercept function for zeDeviceGetFabricVertexExp
__zedlllocal ze_result_t ZE_APICALL
zeDeviceGetFabricVertexExp(
ze_device_handle_t hVertex, ///< [in] handle of the device
ze_fabric_vertex_handle_t* pVertex ///< [out] fabric vertex handle corresponding to device
ze_device_handle_t hDevice, ///< [in] handle of the device
ze_fabric_vertex_handle_t* phVertex ///< [out] fabric vertex handle corresponding to device
)
{
auto pfnGetFabricVertexExp = context.zeDdiTable.DeviceExp.pfnGetFabricVertexExp;
Expand All @@ -4395,15 +4395,15 @@ namespace validation_layer

if( context.enableParameterValidation )
{
if( nullptr == hVertex )
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;

if( nullptr == pVertex )
if( nullptr == phVertex )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;

}

return pfnGetFabricVertexExp( hVertex, pVertex );
return pfnGetFabricVertexExp( hDevice, phVertex );
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit 108c4de

Please sign in to comment.