Skip to content

Name the unusable backend when a model fails to load #1529

Closed

Description

@msluszniak

Problem description

When a model needs a backend that cannot run, ExecuTorch fails with a bare Error::NotFound. Most often this is an MLX or Core ML variant picked explicitly on the iOS simulator (review).

Proposed solution

On a failed load or execute, read the method's backends from MethodMeta and name the unusable one. On a simulator, point to the XNNPACK variant. Cover both loadModel and the LLM runner.

Alternative solutions

Benefits to React Native ExecuTorch

Turns a common setup mistake into a self-explaining error.

Additional context

Draft implementation on @ms/simulator-backend-error (#1527, closed). It touches the LLM runner, so it should land after the runner rewrite.

Activity

  1. added theissue type on Oct 12, 2026
  2. barhanc commented on Oct 12, 2026

    @barhanc
    Member

    In model.cpp this is already kind of addressed. If eager load or lazy first execute of method fails the code throws

    // ...
     "\n"
     "Common causes:\n"
     "  1. Backend not registered\n"
     "     Ensure backends from `model.backends` are registered\n"
     "     in the ExecuTorch runtime\n"
     "     (use `getRegisteredBackends()` to check registered backends).\n"
     "\n"
    // ...

    The llm runner didn't have this as it bypassed our model abstraction but with the new TS runner the LLM inference goes through model.cpp just like any other model.

  3. msluszniak commented on Oct 13, 2026

    @msluszniak
    MemberAuthor

    @barhanc I will add this issue to "resolved by" in PR with TS LLM runner implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions