File tree 3 files changed +8
-15
lines changed
source/adapters/level_zero/v2
3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,6 @@ struct ur_queue_handle_t_ {
36
36
%endfor
37
37
38
38
virtual ur_result_t
39
- enqueueNativeCommandExp(ur_exp_enqueue_native_command_function_t, void *,
40
- uint32_t, const ur_mem_handle_t *,
41
- const ur_exp_enqueue_native_command_properties_t *,
42
- uint32_t, const ur_event_handle_t *,
43
- ur_event_handle_t *) = 0;
39
+ enqueueCommandBuffer(ze_command_list_handle_t, ur_event_handle_t *,
40
+ uint32_t, const ur_event_handle_t *) = 0;
44
41
};
Original file line number Diff line number Diff line change @@ -53,15 +53,15 @@ ur_exp_command_buffer_handle_t_::ur_exp_command_buffer_handle_t_(
53
53
UR_CALL_THROWS (ur::level_zero::urDeviceRetain (device));
54
54
}
55
55
56
- void ur_exp_command_buffer_handle_t_::cleanupCommandBufferResources () {
56
+ ur_exp_command_buffer_handle_t_::~ur_exp_command_buffer_handle_t_ () {
57
57
// Release the memory allocated to the Context stored in the command_buffer
58
- UR_CALL_THROWS ( ur::level_zero::urContextRelease (context) );
58
+ ur::level_zero::urContextRelease (context);
59
59
60
60
// Release the device
61
- UR_CALL_THROWS ( ur::level_zero::urDeviceRelease (device) );
61
+ ur::level_zero::urDeviceRelease (device);
62
62
63
63
for (auto &associatedKernel : kernelsList) {
64
- UR_CALL_THROWS ( ur::level_zero::urKernelRelease (associatedKernel) );
64
+ ur::level_zero::urKernelRelease (associatedKernel);
65
65
}
66
66
}
67
67
@@ -140,12 +140,10 @@ urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
140
140
if (!hCommandBuffer->RefCount .decrementAndTest ())
141
141
return UR_RESULT_SUCCESS;
142
142
143
- hCommandBuffer->cleanupCommandBufferResources ();
144
- } catch (...) {
145
143
delete hCommandBuffer;
144
+ } catch (...) {
146
145
return exceptionToResult (std::current_exception ());
147
146
}
148
- delete hCommandBuffer;
149
147
return UR_RESULT_SUCCESS;
150
148
}
151
149
Original file line number Diff line number Diff line change @@ -31,15 +31,13 @@ struct ur_exp_command_buffer_handle_t_ : public _ur_object {
31
31
ur_device_handle_t device,
32
32
ze_command_list_handle_t commandList,
33
33
const ur_exp_command_buffer_desc_t *desc);
34
+ ~ur_exp_command_buffer_handle_t_ ();
34
35
ur_event_handle_t getSignalEvent (ur_event_handle_t *hUserEvent,
35
36
ur_command_t commandType);
36
37
37
38
std::pair<ze_event_handle_t *, uint32_t >
38
39
getWaitListView (const ur_event_handle_t *phWaitEvents,
39
40
uint32_t numWaitEvents);
40
- // Releases the resources associated with the command-buffer before the
41
- // command-buffer object is destroyed.
42
- void cleanupCommandBufferResources ();
43
41
44
42
// UR context associated with this command-buffer
45
43
ur_context_handle_t context;
You can’t perform that action at this time.
0 commit comments