Skip to content

Docs: replace invalid ExecutionProvider.DeviceType references in FindAllProviders examples - #127

Draft
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/fix-no-devicetype-in-executionprovider
Draft

Docs: replace invalid ExecutionProvider.DeviceType references in FindAllProviders examples#127
John Kennedy (GrantMeStrength) with Copilot wants to merge 2 commits into
docsfrom
copilot/fix-no-devicetype-in-executionprovider

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown

ExecutionProviderCatalog.FindAllProviders docs showed sample code using ExecutionProvider.DeviceType, which is not part of the ExecutionProvider API surface. This updates the examples to use a valid, documented property so the samples are compile-/runtime-consistent.

  • Problem addressed

    • FindAllProviders samples in C#, C++/WinRT, and Python referenced DeviceType/device_type, which does not exist on ExecutionProvider.
  • Documentation updates

    • Updated all three language samples in executionprovidercatalog_findallproviders_2058491835.md to report LibraryPath instead:
      • C#: provider.LibraryPath
      • C++/WinRT: provider.LibraryPath()
      • Python: provider.library_path
  • Example (updated pattern)

var catalog = Microsoft.Windows.AI.MachineLearning.ExecutionProviderCatalog.GetDefault();
var providers = catalog.FindAllProviders();

foreach (var provider in providers)
{
    Console.WriteLine($"Found provider: {provider.Name}, Library path: {provider.LibraryPath}");
}

Copilot AI changed the title [WIP] Fix missing DeviceType in ExecutionProvider documentation Docs: replace invalid ExecutionProvider.DeviceType references in FindAllProviders examples Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: No DeviceType in ExecutionProvider (Microsoft.Windows.AI.MachineLearning)

2 participants