Skip to content

Commit

Permalink
[Bindless][Exp] Fix semaphore import function parameter name
Browse files Browse the repository at this point in the history
- Pointer parameter now correctly prefixed with `p`
  • Loading branch information
przemektmalon committed Jul 14, 2023
1 parent bc0b581 commit 1b13824
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 24 deletions.
12 changes: 6 additions & 6 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -7164,16 +7164,16 @@ urBindlessImagesReleaseInteropExp(
/// + `NULL == hContext`
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
/// + `NULL == interopSemaphoreDesc`
/// + `NULL == pInteropSemaphoreDesc`
/// + `NULL == phInteropSemaphore`
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
/// - ::UR_RESULT_ERROR_INVALID_VALUE
UR_APIEXPORT ur_result_t UR_APICALL
urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t *interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t *pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
);

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -9277,7 +9277,7 @@ typedef struct ur_bindless_images_release_interop_exp_params_t {
typedef struct ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t {
ur_context_handle_t *phContext;
ur_device_handle_t *phDevice;
ur_exp_interop_semaphore_desc_t **pinteropSemaphoreDesc;
ur_exp_interop_semaphore_desc_t **ppInteropSemaphoreDesc;
ur_exp_interop_semaphore_handle_t **pphInteropSemaphore;
} ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t;

Expand Down
2 changes: 2 additions & 0 deletions scripts/core/EXP-BINDLESS-IMAGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ Changelog
+----------+-------------------------------------------------------------+
| 5.0 | Update interop struct and func param names to adhere to convention. |
+----------+-------------------------------------------------------------+
| 6.0 | Fix semaphore import function parameter name. |
+----------+-------------------------------------------------------------+

Contributors
--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/core/exp-bindless-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ params:
name: hDevice
desc: "[in] handle of the device object"
- type: $x_exp_interop_semaphore_desc_t*
name: interopSemaphoreDesc
name: pInteropSemaphoreDesc
desc: "[in] the interop semaphore descriptor"
- type: $x_exp_interop_semaphore_handle_t*
name: phInteropSemaphore
Expand Down
4 changes: 2 additions & 2 deletions source/adapters/null/ur_nullddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4215,7 +4215,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) try {
Expand All @@ -4227,7 +4227,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
.pfnImportExternalSemaphoreOpaqueFDExp;
if (nullptr != pfnImportExternalSemaphoreOpaqueFDExp) {
result = pfnImportExternalSemaphoreOpaqueFDExp(
hContext, hDevice, interopSemaphoreDesc, phInteropSemaphore);
hContext, hDevice, pInteropSemaphoreDesc, phInteropSemaphore);
} else {
// generic implementation
*phInteropSemaphore =
Expand Down
4 changes: 2 additions & 2 deletions source/common/ur_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10167,9 +10167,9 @@ operator<<(std::ostream &os, const struct
ur_params::serializePtr(os, *(params->phDevice));

os << ", ";
os << ".interopSemaphoreDesc = ";
os << ".pInteropSemaphoreDesc = ";

ur_params::serializePtr(os, *(params->pinteropSemaphoreDesc));
ur_params::serializePtr(os, *(params->ppInteropSemaphoreDesc));

os << ", ";
os << ".phInteropSemaphore = ";
Expand Down
6 changes: 3 additions & 3 deletions source/loader/layers/tracing/ur_trcddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4802,7 +4802,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) {
Expand All @@ -4815,13 +4815,13 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
}

ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t params =
{&hContext, &hDevice, &interopSemaphoreDesc, &phInteropSemaphore};
{&hContext, &hDevice, &pInteropSemaphoreDesc, &phInteropSemaphore};
uint64_t instance = context.notify_begin(
UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXP,
"urBindlessImagesImportExternalSemaphoreOpaqueFDExp", &params);

ur_result_t result = pfnImportExternalSemaphoreOpaqueFDExp(
hContext, hDevice, interopSemaphoreDesc, phInteropSemaphore);
hContext, hDevice, pInteropSemaphoreDesc, phInteropSemaphore);

context.notify_end(
UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXP,
Expand Down
6 changes: 3 additions & 3 deletions source/loader/layers/validation/ur_valddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6092,7 +6092,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) {
Expand All @@ -6113,7 +6113,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
return UR_RESULT_ERROR_INVALID_NULL_HANDLE;
}

if (NULL == interopSemaphoreDesc) {
if (NULL == pInteropSemaphoreDesc) {
return UR_RESULT_ERROR_INVALID_NULL_POINTER;
}

Expand All @@ -6123,7 +6123,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
}

ur_result_t result = pfnImportExternalSemaphoreOpaqueFDExp(
hContext, hDevice, interopSemaphoreDesc, phInteropSemaphore);
hContext, hDevice, pInteropSemaphoreDesc, phInteropSemaphore);

return result;
}
Expand Down
4 changes: 2 additions & 2 deletions source/loader/ur_ldrddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5858,7 +5858,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) {
Expand All @@ -5880,7 +5880,7 @@ urBindlessImagesImportExternalSemaphoreOpaqueFDExp(

// forward to device-platform
result = pfnImportExternalSemaphoreOpaqueFDExp(
hContext, hDevice, interopSemaphoreDesc, phInteropSemaphore);
hContext, hDevice, pInteropSemaphoreDesc, phInteropSemaphore);

if (UR_RESULT_SUCCESS != result) {
return result;
Expand Down
6 changes: 3 additions & 3 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6427,15 +6427,15 @@ ur_result_t UR_APICALL urBindlessImagesReleaseInteropExp(
/// + `NULL == hContext`
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
/// + `NULL == interopSemaphoreDesc`
/// + `NULL == pInteropSemaphoreDesc`
/// + `NULL == phInteropSemaphore`
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
/// - ::UR_RESULT_ERROR_INVALID_VALUE
ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) try {
Expand All @@ -6447,7 +6447,7 @@ ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
}

return pfnImportExternalSemaphoreOpaqueFDExp(
hContext, hDevice, interopSemaphoreDesc, phInteropSemaphore);
hContext, hDevice, pInteropSemaphoreDesc, phInteropSemaphore);
} catch (...) {
return exceptionToResult(std::current_exception());
}
Expand Down
4 changes: 2 additions & 2 deletions source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5426,15 +5426,15 @@ ur_result_t UR_APICALL urBindlessImagesReleaseInteropExp(
/// + `NULL == hContext`
/// + `NULL == hDevice`
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
/// + `NULL == interopSemaphoreDesc`
/// + `NULL == pInteropSemaphoreDesc`
/// + `NULL == phInteropSemaphore`
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
/// - ::UR_RESULT_ERROR_INVALID_VALUE
ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
ur_exp_interop_semaphore_desc_t
*interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
*pInteropSemaphoreDesc, ///< [in] the interop semaphore descriptor
ur_exp_interop_semaphore_handle_t *
phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
) {
Expand Down

0 comments on commit 1b13824

Please sign in to comment.