Skip to content

Return "platform not supported" when using PyTorch on intel-based Macbooks聽#9772

Closed

Description

@nil-is-all

馃殌 The feature, motivation and pitch

Currently, when a user installs requirements for ExecuTorch on their Intel-chip Macbook by running the ./install_requirements.sh after git-cloning the ExecuTorch repo, the installation fails for torch versions, throwing an error and a stack trace.

ERROR: Could not find a version that satisfies the requirement torch==2.7.0.dev20250310 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2) ERROR: No matching distribution found for torch==2.7.0.dev20250310

Image

Alternatives

  1. Return a message stating "this platform is not supported" while running PyTorch on Intel Macbooks
  2. Updating documentation to add a disclaimer or in pre-requisites that PyTorch does not work anymore on Intel Macbooks.

Additional context

No response

RFC (Optional)

No response

cc @larryliu0820 @jathu @lucylq

Activity

  1. added
    module: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorch
    triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
    on Mar 31, 2025
  2. swolchok commented on Mar 31, 2025

    @swolchok
    Contributor

    See #6691 (comment) . In short, PyTorch officially deprecated Intel Macs back in January 2024. ExecuTorch is PyTorch, so I imagine we will follow suit.

  3. ali-khosh commented on Apr 1, 2025

    @ali-khosh

    Right. I don't think the goal is to add support. But instead to make documentation/errors more human readable, as suggested in the Alternative section above:

    • Return a message stating "this platform is not supported" while running PyTorch on Intel Macbooks
    • Updating documentation to add a disclaimer or in pre-requisites that PyTorch does not work anymore on Intel Macbooks.
  4. keyprocedure commented on Apr 1, 2025

    @keyprocedure
    Contributor

    I鈥檇 be down to work on this!

  5. mergennachin commented on Apr 3, 2025

    @mergennachin
    Contributor

    @swolchok @keyprocedure @ali-khosh

    ExecuTorch itself actually works with Intel Macs -- as in users should be able to install ExecuTorch from source. The reason it is "not working" is that torch package is not available on Intel Mac via pypi. However, we should be able to compile torch from source and install on Intel Mac first.

    Instead of upright saying, "we don't support Intel Macs", what's your thought on adding a documentation on how-to do compile torch and ExecuTorch from source on Intel Macs.

  6. keyprocedure commented on Apr 4, 2025

    @keyprocedure
    Contributor

    I鈥檇 be happy to help with documentation for building from source if that鈥檚 the direction we move in.

  7. mergennachin commented on Apr 23, 2025

    @mergennachin
    Contributor

    @keyprocedure

    Yes, I agree with this direction for improving documentation and scripts for such use cases.
    For reference, these past issues provide context:

    #6691
    #6689
    #7732

    And the current documentation: https://pytorch.org/executorch/0.6/using-executorch-building-from-source.html
    Currently, ./install_executorch.sh script first downloads and installs the torch pip package. I'd like the documentation to include instructions similar to:

    "If you want to compile torch version, here's what you can do:

    For Intel Mac support, we should clarify: "We don't officially support prebuilt binaries for PyPI on Intel Macs, but here's how you can compile from source." This applies to any scenario where developers need to compile from source (e.g., needing the latest version).

    Your task would be to:

    • Verify this workflow works in clean conda environments
    • Update the docs to reflect this process
  8. keyprocedure commented on Apr 23, 2025

    @keyprocedure
    Contributor

    @mergennachin Sounds good! I'll look into this and follow up soon.

  9. keyprocedure commented on Apr 29, 2025

    @keyprocedure
    Contributor

    @mergennachin

    After building PyTorch from source on an Intel-Mac and adding a --no-deps flag to the pip install command, I'm getting some build errors when I run ./install_executorch.sh --use-pt-pinned-commit. Since torch is downgraded to torch-2.2.2-cp310-none-macosx_10_9_x86_64.whl, it looks like some components are missing and I'm getting the following errors:

    • error: use of undeclared identifier 'C10_FALLTHROUGH
    • ATen/native/cpu/Gelu.h not found
    • no matching conversion for static_cast from 'c10::complex<c10::Half>' to 'c10::complex<double>'
    • use of undeclared identifier 'overflows'

    Do you have any suggestions on how to move forward?

  10. keyprocedure commented on May 2, 2025

    @keyprocedure
    Contributor

    I was able to prevent pip from changing the installed PyTorch build when running install_executorch.sh --use-pt-pinned-commit by adding the no-deps flag to the pip install command in install_requirements.sh. After debugging some issues (TorchConfig.cmake not found, missing omp.h, and a libomp.dylib link error), I was able to install executorch with a prebuilt PyTorch build on both an Intel and ARM64 macOS system.

    I opened a draft PR. If it looks good, I'd be happy to publish it.

    What do you all think about next steps?

  11. added a commit that references this issue on Jun 20, 2025
    9345972
  12. added a commit that references this issue on Jun 26, 2025
    add3676
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

    good first issueGood for newcomersmodule: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions