Skip to content

CoreML Partitioner is not able to lower mv3 #10451

Closed
@mergennachin

Description

@mergennachin

🐛 Describe the bug

    model = models.mobilenet_v3_small(weights="DEFAULT").eval()
    sample_inputs = (torch.randn(1, 3, 224, 224),)


    et_program_coreml = to_edge_transform_and_lower(
        torch.export.export(model, sample_inputs),
        partitioner=[CoreMLPartitioner()],
    ).to_executorch()


   with open("mv3_coreml_all.pte", "wb") as file:
        et_program_coreml.write_to_file(file)

Even though it is able to generate a file, it is spewing so much error. And during runtime it is crashing.

https://gist.github.com/mergennachin/74ca8ef593bc6c962d8d1baacaede2ed

On the other hand,

python3 -m executorch.examples.apple.coreml.scripts.export --model_name=mv3

is fine because it has many layers of patches to make CoreML work

Versions

executorch==0.6.0

cc @kimishpatel @YifanShenSZ @cymbalrush @metascroy @byjlw

Metadata

Metadata

Labels

module: coremlIssues related to Apple's Core ML delegation and code under backends/apple/coreml/module: user experienceIssues related to reducing friction for users

Type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions