Skip to content

Commit

Permalink
Auto-upgrade device pool for ANE
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Executorch committed Dec 20, 2024
1 parent 184b020 commit 5dbf903
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .ci/scripts/gather_benchmark_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Device pools for AWS Device Farm
DEVICE_POOLS = {
"apple_iphone_15": "arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/3b5acd2e-92e2-4778-b651-7726bafe129d",
"apple_iphone_15+ios_18": "arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/12c8b15c-8d03-4e07-950d-0a627e7595b4",
"samsung_galaxy_s22": "arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/e59f866a-30aa-4aa1-87b7-4510e5820dfa",
"samsung_galaxy_s24": "arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/98f8788c-2e25-4a3c-8bb2-0d1e8897c0db",
"google_pixel_8_pro": "arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/d65096ab-900b-4521-be8b-a3619b69236a",
Expand Down Expand Up @@ -197,10 +198,17 @@ def get_benchmark_configs() -> Dict[str, Dict]:

# Add configurations for each valid device
for device in devices:
if device not in DEVICE_POOLS:
logging.warning(f"Unsupported device '{device}'. Skipping.")
continue
for config in configs:
if config == "llama3_coreml_ane":
device = f"{device}+ios_18"
logging.info(
f"Benchmark config '{config}' only works on iOS 18+, auto-upgraded device pool to '{device}'"
)

if device not in DEVICE_POOLS:
logging.warning(f"Unsupported device '{device}'. Skipping.")
continue

record = {
"model": model_name,
"config": config,
Expand Down
6 changes: 5 additions & 1 deletion extension/llm/export/partitioner_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ def _validate_ios_version() -> None:
op_linear_quantizer_config=op_linear_quantizer_config,
)

take_over_mutable_buffer = minimum_deployment_target >= ct.target.iOS18
# ExecuTorch does not build CoreML delegate runtime to handle state
# when using OSS scripts, so we define take_over_mutable_buffer = False,
# even when target is iOS18
# take_over_mutable_buffer = minimum_deployment_target >= ct.target.iOS18
take_over_mutable_buffer = False
return CoreMLPartitioner( # pyre-fixme[16]
compile_specs=compile_specs,
take_over_mutable_buffer=take_over_mutable_buffer,
Expand Down

0 comments on commit 5dbf903

Please sign in to comment.