|
13 | 13 | from examples.models import MODEL_NAME_TO_MODEL |
14 | 14 | from examples.xnnpack import MODEL_NAME_TO_OPTIONS |
15 | 15 |
|
16 | | - |
17 | 16 | DEFAULT_RUNNERS = { |
18 | 17 | "linux": "linux.2xlarge", |
19 | 18 | "macos": "macos-m1-stable", |
|
24 | 23 | "w2l": "linux.12xlarge", |
25 | 24 | "ic4": "linux.12xlarge", |
26 | 25 | "resnet50": "linux.12xlarge", |
| 26 | + "llava_encoder": "linux.4xlarge", |
27 | 27 | # This one causes timeout on smaller runner, the root cause is unclear (T161064121) |
28 | 28 | "dl3": "linux.12xlarge", |
29 | 29 | "emformer_join": "linux.12xlarge", |
@@ -83,7 +83,17 @@ def model_should_run_on_event(model: str, event: str) -> bool: |
83 | 83 | We put higher priority and fast models to pull request and rest to push. |
84 | 84 | """ |
85 | 85 | if event == "pull_request": |
86 | | - return model in ["add", "ic3", "mv2", "mv3", "resnet18", "vit"] |
| 86 | + return model in ["add", "ic3", "mv2", "mv3", "resnet18", "vit", "llava_encoder"] |
| 87 | + return True |
| 88 | + |
| 89 | + |
| 90 | +def model_should_run_on_target_os(model: str, target_os: str) -> bool: |
| 91 | + """ |
| 92 | + A helper function to decide whether a model should be tested on a target os (linux/macos). |
| 93 | + For example, a big model can be disabled in macos due to the limited macos resources. |
| 94 | + """ |
| 95 | + if target_os == "macos": |
| 96 | + return model not in ["llava_encoder"] |
87 | 97 | return True |
88 | 98 |
|
89 | 99 |
|
@@ -119,6 +129,9 @@ def export_models_for_ci() -> dict[str, dict]: |
119 | 129 | if not model_should_run_on_event(name, event): |
120 | 130 | continue |
121 | 131 |
|
| 132 | + if not model_should_run_on_target_os(name, target_os): |
| 133 | + continue |
| 134 | + |
122 | 135 | if backend == "xnnpack": |
123 | 136 | if name not in MODEL_NAME_TO_OPTIONS: |
124 | 137 | continue |
|
0 commit comments