Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PatriceVignola committed Apr 5, 2024
1 parent 6c4a3d5 commit b0131b2
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,23 +359,23 @@ void DmlCommandRecorder::CloseAndExecute(_In_opt_ ID3D12GraphicsCommandList* com
{
ORT_THROW_IF_FAILED(m_currentCommandList->Close());

onnxruntime::concurrency::ThreadPool::Schedule(m_threadPool.get(), [this, currentCommandListInfo = m_currentCommandListInfo]() {
currentCommandListInfo->completionEvent.WaitForSignal();
ORT_THROW_IF_FAILED(currentCommandListInfo->allocator->Reset());
ORT_THROW_IF_FAILED(currentCommandListInfo->commandList->Reset(currentCommandListInfo->allocator.Get(), nullptr));

{
std::unique_lock lock(m_mutex);
m_availableCommandLists.push_back(std::move(currentCommandListInfo));
}
});

ID3D12GraphicsCommandList* commandListsToExecute[2] = {};
uint32_t commandListsToExecuteCount = 0;

if (m_operationsRecordedInCurrentCommandList)
{
commandListsToExecute[commandListsToExecuteCount++] = m_currentCommandList.Get();

onnxruntime::concurrency::ThreadPool::Schedule(m_threadPool.get(), [this, currentCommandListInfo = m_currentCommandListInfo]() {
currentCommandListInfo->completionEvent.WaitForSignal();
ORT_THROW_IF_FAILED(currentCommandListInfo->allocator->Reset());
ORT_THROW_IF_FAILED(currentCommandListInfo->commandList->Reset(currentCommandListInfo->allocator.Get(), nullptr));

{
std::unique_lock lock(m_mutex);
m_availableCommandLists.push_back(std::move(currentCommandListInfo));

Check warning on line 376 in onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommandRecorder.cpp

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <utility> for move [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/dml/DmlExecutionProvider/src/DmlCommandRecorder.cpp:376: Add #include <utility> for move [build/include_what_you_use] [4]
}
});
}

if (commandList)
Expand Down

0 comments on commit b0131b2

Please sign in to comment.