Skip to content

Commit 9ebf5ef

Browse files
authored
[ET-VK] Return fence after waiting is done.
Differential Revision: D74484825 Pull Request resolved: #10787
1 parent 0ee97bd commit 9ebf5ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backends/vulkan/runtime/graph/ComputeGraph.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ void ComputeGraph::prepack() const {
625625
vkapi::VulkanFence fence = context_->fences().get_fence();
626626
context_->submit_cmd_to_gpu(fence.get_submit_handle(), /*final_use = */ true);
627627
fence.wait();
628+
context_->fences().return_fence(fence);
628629

629630
context_->flush();
630631
}
@@ -649,6 +650,7 @@ void ComputeGraph::execute() const {
649650
vkapi::VulkanFence fence = context_->fences().get_fence();
650651
context_->submit_cmd_to_gpu(fence.get_submit_handle());
651652
fence.wait();
653+
context_->fences().return_fence(fence);
652654
}
653655

654656
void ComputeGraph::resize_input(

0 commit comments

Comments
 (0)