File tree Expand file tree Collapse file tree 12 files changed +28
-21
lines changed Expand file tree Collapse file tree 12 files changed +28
-21
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ $ mkdir build
19
19
$ cd build
20
20
$ cmake .. -DUR_ENABLE_TRACING=ON
21
21
$ make
22
- $ UR_ADAPTERS_FORCE_LOAD=./lib/libur_adapter_null .so UR_ENABLE_LAYERS=UR_LAYER_TRACING XPTI_TRACE_ENABLE=1 XPTI_FRAMEWORK_DISPATCHER=./lib/libxptifw.so XPTI_SUBSCRIBERS=./lib/libcollector.so ./bin/hello_world
22
+ $ UR_ADAPTERS_FORCE_LOAD=./lib/libur_adapter_mock .so UR_ENABLE_LAYERS=UR_LAYER_TRACING XPTI_TRACE_ENABLE=1 XPTI_FRAMEWORK_DISPATCHER=./lib/libxptifw.so XPTI_SUBSCRIBERS=./lib/libcollector.so ./bin/hello_world
23
23
```
24
24
25
25
See [ XPTI framework documentation] ( https://github.com/intel/llvm/blob/sycl/xptifw/doc/XPTI_Framework.md ) for more information.
Original file line number Diff line number Diff line change @@ -8822,7 +8822,7 @@ urCommandBufferEnqueueExp(
8822
8822
/// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
8823
8823
UR_APIEXPORT ur_result_t UR_APICALL
8824
8824
urCommandBufferRetainCommandExp(
8825
- ur_exp_command_buffer_command_handle_t hCommand ///< [in] Handle of the command-buffer command.
8825
+ ur_exp_command_buffer_command_handle_t hCommand ///< [in][retain] Handle of the command-buffer command.
8826
8826
);
8827
8827
8828
8828
///////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -879,7 +879,7 @@ name: RetainCommandExp
879
879
params :
880
880
- type : $x_exp_command_buffer_command_handle_t
881
881
name : hCommand
882
- desc : " [in] Handle of the command-buffer command."
882
+ desc : " [in][retain] Handle of the command-buffer command."
883
883
returns :
884
884
- $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP
885
885
- $X_RESULT_ERROR_OUT_OF_RESOURCES
Original file line number Diff line number Diff line change 1
1
/*
2
2
*
3
- * Copyright (C) 2019- 2024 Intel Corporation
3
+ * Copyright (C) 2024 Intel Corporation
4
4
*
5
5
* Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
6
6
* See LICENSE.TXT
@@ -9139,7 +9139,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp(
9139
9139
// / @brief Intercept function for urCommandBufferRetainCommandExp
9140
9140
__urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
9141
9141
ur_exp_command_buffer_command_handle_t
9142
- hCommand // /< [in] Handle of the command-buffer command.
9142
+ hCommand // /< [in][retain] Handle of the command-buffer command.
9143
9143
) try {
9144
9144
ur_result_t result = UR_RESULT_SUCCESS;
9145
9145
@@ -9161,6 +9161,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp(
9161
9161
result = replaceCallback (¶ms);
9162
9162
} else {
9163
9163
9164
+ mock::retainDummyHandle (hCommand);
9164
9165
result = UR_RESULT_SUCCESS;
9165
9166
}
9166
9167
Original file line number Diff line number Diff line change @@ -7135,7 +7135,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp(
7135
7135
// / @brief Intercept function for urCommandBufferRetainCommandExp
7136
7136
__urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
7137
7137
ur_exp_command_buffer_command_handle_t
7138
- hCommand // /< [in] Handle of the command-buffer command.
7138
+ hCommand // /< [in][retain] Handle of the command-buffer command.
7139
7139
) {
7140
7140
auto pfnRetainCommandExp =
7141
7141
context.urDdiTable .CommandBufferExp .pfnRetainCommandExp ;
Original file line number Diff line number Diff line change @@ -8722,7 +8722,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp(
8722
8722
// / @brief Intercept function for urCommandBufferRetainCommandExp
8723
8723
__urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
8724
8724
ur_exp_command_buffer_command_handle_t
8725
- hCommand // /< [in] Handle of the command-buffer command.
8725
+ hCommand // /< [in][retain] Handle of the command-buffer command.
8726
8726
) {
8727
8727
auto pfnRetainCommandExp =
8728
8728
context.urDdiTable .CommandBufferExp .pfnRetainCommandExp ;
Original file line number Diff line number Diff line change @@ -7492,7 +7492,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp(
7492
7492
// / @brief Intercept function for urCommandBufferRetainCommandExp
7493
7493
__urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
7494
7494
ur_exp_command_buffer_command_handle_t
7495
- hCommand // /< [in] Handle of the command-buffer command.
7495
+ hCommand // /< [in][retain] Handle of the command-buffer command.
7496
7496
) {
7497
7497
ur_result_t result = UR_RESULT_SUCCESS;
7498
7498
@@ -7514,6 +7514,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferRetainCommandExp(
7514
7514
// forward to device-platform
7515
7515
result = pfnRetainCommandExp (hCommand);
7516
7516
7517
+ if (UR_RESULT_SUCCESS != result) {
7518
+ return result;
7519
+ }
7520
+
7521
+ // TODO: do we need to ref count the loader handles?
7522
+
7517
7523
return result;
7518
7524
}
7519
7525
Original file line number Diff line number Diff line change @@ -8173,7 +8173,7 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp(
8173
8173
// / - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
8174
8174
ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
8175
8175
ur_exp_command_buffer_command_handle_t
8176
- hCommand // /< [in] Handle of the command-buffer command.
8176
+ hCommand // /< [in][retain] Handle of the command-buffer command.
8177
8177
) try {
8178
8178
auto pfnRetainCommandExp =
8179
8179
ur_lib::context->urDdiTable .CommandBufferExp .pfnRetainCommandExp ;
Original file line number Diff line number Diff line change @@ -6928,7 +6928,7 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp(
6928
6928
// / - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
6929
6929
ur_result_t UR_APICALL urCommandBufferRetainCommandExp (
6930
6930
ur_exp_command_buffer_command_handle_t
6931
- hCommand // /< [in] Handle of the command-buffer command.
6931
+ hCommand // /< [in][retain] Handle of the command-buffer command.
6932
6932
) {
6933
6933
ur_result_t result = UR_RESULT_SUCCESS;
6934
6934
return result;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ function(add_conformance_test name)
87
87
if (NOT (UR_BUILD_ADAPTER_CUDA OR UR_BUILD_ADAPTER_HIP
88
88
OR UR_BUILD_ADAPTER_L0 OR UR_BUILD_ADAPTER_OPENCL
89
89
OR UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_ALL ))
90
- add_test_adapter (${name} adapter_null )
90
+ add_test_adapter (${name} adapter_mock )
91
91
endif ()
92
92
endfunction ()
93
93
You can’t perform that action at this time.
0 commit comments