diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp index 6b0faaad43175..618321a789fa9 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/ExecutionProvider.cpp @@ -444,6 +444,12 @@ namespace Dml { ORT_TRY { + + if (m_allocator) + { + m_context->SetAllocator(m_allocator); + } + assert(!m_closed); DML_BINDING_DESC persistentResourceBindingDesc =