ExecutionProviderCatalog.FindAllProviders Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves a collection of all execution providers compatible with the current hardware.
public:
virtual Platform::Array <ExecutionProvider ^> ^ FindAllProviders() = FindAllProviders;
winrt::array_view <ExecutionProvider const&> FindAllProviders();
public ExecutionProvider[] FindAllProviders();
function findAllProviders()
Public Function FindAllProviders () As ExecutionProvider()
Returns
A collection of all execution providers compatible with the current hardware.
Examples
var catalog = Microsoft.Windows.AI.MachineLearning.ExecutionProviderCatalog.GetDefault();
var providers = catalog.FindAllProviders();
foreach (var provider in providers)
{
Console.WriteLine($"Found provider: {provider.Name}, Type: {provider.DeviceType}");
}
auto catalog = winrt::Microsoft::Windows::AI::MachineLearning::ExecutionProviderCatalog::GetDefault();
auto providers = catalog.FindAllProviders();
for (const auto& provider : providers)
{
std::wcout << L"Found provider: " << provider.Name().c_str()
<< L", Type: " << static_cast<int>(provider.DeviceType()) << L"\n";
}
catalog = winml.ExecutionProviderCatalog.get_default()
providers = catalog.find_all_providers()
for provider in providers:
print(f"Found provider: {provider.name}, Type: {provider.device_type}")