add any option to platforms after checking providers
This commit is contained in:
parent
e4785b94e0
commit
f45a0154e8
|
@ -344,9 +344,6 @@ def load_platforms(context: ServerContext):
|
|||
providers = []
|
||||
providers.extend(get_available_providers())
|
||||
|
||||
if context.any_platform:
|
||||
providers.append("any")
|
||||
|
||||
for potential in platform_providers:
|
||||
if (
|
||||
platform_providers[potential] in providers
|
||||
|
@ -368,6 +365,9 @@ def load_platforms(context: ServerContext):
|
|||
DeviceParams(potential, platform_providers[potential])
|
||||
)
|
||||
|
||||
if context.any_platform:
|
||||
available_platforms.append("any")
|
||||
|
||||
# make sure CPU is last on the list
|
||||
def any_first_cpu_last(a: DeviceParams, b: DeviceParams):
|
||||
if a.device == b.device:
|
||||
|
|
Loading…
Reference in New Issue