From d7b7e4b01063bc792e84a35bfc957ed41c9837ba Mon Sep 17 00:00:00 2001 From: Jeff Bloomfield Date: Mon, 14 Nov 2022 11:59:44 -0800 Subject: [PATCH] Default kOrtSessionOptionsDisableQuantQDQ to 1 when DML EP is registered --- onnxruntime/core/session/inference_session.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/onnxruntime/core/session/inference_session.cc b/onnxruntime/core/session/inference_session.cc index 5ae8ab8cf7..6b228df421 100644 --- a/onnxruntime/core/session/inference_session.cc +++ b/onnxruntime/core/session/inference_session.cc @@ -498,6 +498,14 @@ common::Status InferenceSession::RegisterExecutionProvider(const std::shared_ptr session_options_.enable_mem_pattern = false; } + // Default to disabling generation of QDQ for the DML EP + if (session_options_.config_options.GetConfigEntry(kOrtSessionOptionsDisableQuantQDQ) == std::nullopt) { + auto st = session_options_.config_options.AddConfigEntry(kOrtSessionOptionsDisableQuantQDQ, "1"); + if (!st.IsOK()) { + return st; + } + } + // Parallel execution mode does not support DML EP if (session_options_.execution_mode != ExecutionMode::ORT_SEQUENTIAL) { LOGS(*session_logger_, WARNING)