Commits


Dwayne Robinson authored and GitHub committed f6d0598b4d9
DML EP return clearer error message when users attempt to use software adapter (#14273) ### Description The DML EP provider factory verifies the adapter id is a real GPU (not some software emulation like WARP which would be quite slow or basic display driver which lacks D3D compute ability), but the automated tests sometimes erratically get run on a variety of ADO cloud machines that lack a GPU or are in a bad state such that Windows fell back to software emulation. In such cases, you end up reaching the `!IsSoftwareAdapter` check in the provider factory ([line 132](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/dml/dml_provider_factory.cc#L132)) and seeing in the pipeline logs E_INVALIDARG. Let's return a more immediately enlightening error code like ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER rather than just E_INVALIDARG. ### Motivation and Context - *Why is this change required? What problem does it solve* Pipeline noise. - *If it fixes an open issue, please link to the issue here.* NA.