Giter Site home page Giter Site logo

Comments (5)

malfet avatar malfet commented on June 11, 2024

One does not need to compile BLAS for MacOS (and I assume iOS platform) as it's already shipped with OS as part of Accelerate framework.

Is there an existing example of either a numpy or say PIL working on iOS?

from pytorch.

marcpabst avatar marcpabst commented on June 11, 2024

The BeeWare project has a conda repository here: https://anaconda.org/beeware/repo. As far as I know, they are compiled using this repo: https://github.com/beeware/mobile-forge.

CC @mhsmith @freakboy3742

from pytorch.

freakboy3742 avatar freakboy3742 commented on June 11, 2024

Hi - BeeWare maintainer and author of PEP 730 here.

PEP 730 was only finalised a month or so ago; there's still a lot of work to be done before the wider community will be in a position to provide iOS-compliant binary wheels. Most notably, PyPI won't currently accept iOS-tagged wheels; there are also a lot of tools in the build ecosystem (cibuildwheel, meson-python, etc) that need to be patched. This is something that we (BeeWare) will be focusing on for the rest of this year.

FWIW: we currently have binary wheels on Numpy, PIL, and a bunch of other packages working on iOS. We're patching and maintaining these builds independently, which is a lot of work - we'd vastly prefer to have the broader ecosystem manage iOS and Android packaging on it's own, rather than requiring us to build every package that might be requested. Once the tooling is in place, we expect we'll be submitting patches upstream so that libraries like Numpy, PIL and PyTorch can produce iOS and Android artefacts as part of their regular CI and release tooling.

PyTorch is a package that is requested regularly on our support channels. It doesn't build "out of the box" for iOS (which is hardly surprising), but I also haven't spent a lot of time trying to patch the build. If PyTorch can use Accelerate, then it's entirely possible that it can be built for iOS - it's just a question of how to tweak the build configuration so that Accelerate is picked up. This usually means there is something in either the build or runtime configuration that is doing a sys.platform check that has a special case for darwin; this will need to be modified to also make a special case for ios (with possibly the same logic as darwin). There may be some other "platform specific" assumptions that need to be tracked down as well.

from pytorch.

marcpabst avatar marcpabst commented on June 11, 2024

Thanks for your detailed comment! I apologise if bringing up this issue seems premature. I definitely didn't want to detract from the tremendous effort that @freakboy3742 (and others) have invested in making iOS an official Python target. I absolutely believe they should lead the discussion on how to integrate iOS support into the mainline tooling.

I understand it might be a bit early to discuss making iOS an official target for PyTorch, so now, I'm interested in exploring (ad-hoc and potentially crude) ways to get PyTorch running on iOS (mainly as a dependency for Pyro). And if anything from this effort proves useful for the official support, that would be fantastic. When I have some time, I'll look into how PyTorch builds and how in relies on Accelerate (on MacOS), but for now, I assume https://github.com/beeware/mobile-forge is still the recommended approach?

from pytorch.

freakboy3742 avatar freakboy3742 commented on June 11, 2024

@marcpabst At least from my perspective, having a working recipe on mobile-forge would be the best path forward. Once that recipe is in place, BeeWare would be in a position to publish an unofficial wheel, and we'd have a clear idea of what needs to be patched upstream when the tooling is in place to support that.

from pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.