MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / try_match_architecture_defaults

Function try_match_architecture_defaults

fastdeploy/config.py:95–108  ·  view source on GitHub ↗
(
    architecture: str,
    *,
    runner_type: Optional[RunnerType] = None,
    convert_type: Optional[ConvertType] = None,
)

Source from the content-addressed store, hash-verified

93
94
95def try_match_architecture_defaults(
96 architecture: str,
97 *,
98 runner_type: Optional[RunnerType] = None,
99 convert_type: Optional[ConvertType] = None,
100):
101 for suffix, (default_runner_type, default_convert_type) in iter_architecture_defaults():
102 if (
103 (runner_type is None or runner_type == default_runner_type)
104 and (convert_type is None or convert_type == default_convert_type)
105 and architecture.endswith(suffix)
106 ):
107 return suffix, (default_runner_type, default_convert_type)
108 return None
109
110
111class MoEPhase:

Callers 4

_normalize_archMethod · 0.90

Calls 1

Tested by

no test coverage detected