diff --git a/onnxruntime/core/providers/dml/dml_provider_factory.cc b/onnxruntime/core/providers/dml/dml_provider_factory.cc index 9af5fd42b0..9f589a0d3a 100644 --- a/onnxruntime/core/providers/dml/dml_provider_factory.cc +++ b/onnxruntime/core/providers/dml/dml_provider_factory.cc @@ -129,7 +129,7 @@ std::shared_ptr DMLProviderFactoryCreator::Create(int // anyway) such as operation kernel registry enumeration for documentation purposes. if (!skip_software_device_check) { - ORT_THROW_HR_IF(E_INVALIDARG, IsSoftwareAdapter(adapter.Get())); + ORT_THROW_HR_IF(ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER, IsSoftwareAdapter(adapter.Get())); } ComPtr d3d12_device;