[Platform] Allow platform use V1 Engine by default (#19792)

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
wangxiyuan
2025-06-18 13:03:36 +00:00
committed by GitHub
parent cca91a7a10
commit 257ab95439
3 changed files with 20 additions and 9 deletions
+8
View File
@@ -269,3 +269,11 @@ class CpuPlatform(Platform):
model configuration.
"""
return True
@classmethod
def default_v1(cls, model_config) -> bool:
"""Returns whether the current platform can use v1 by default for the
supplied model configuration.
"""
return cls.supports_v1(
model_config) and cls.get_cpu_architecture() == CpuArchEnum.X86