Comments (5)
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.
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.
from pytorch.
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.
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.
@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)
- segfault when registering op with mismatched schema HOT 1
- UNSTABLE pull / linux-focal-cuda12.4-py3.10-gcc9-sm86 / build HOT 1
- UNSTABLE pull / linux-focal-cuda12.4-py3.10-gcc9 / build HOT 2
- `torch.einsum` docs don't mention that `opt_einsum` must be installed separately HOT 1
- Strict export fails when generating empty graph
- [dynamo] Detect mkldnn_max_pool2d/mkldnn view errors at tracing time HOT 1
- [dynamo] Module tracker test errors in dynamo at runtime HOT 1
- [dynamo] Activation checkpointing tests erroring at runtime
- Multiple Inputs/Outputs with torch.onnx.dynamo_export
- [ONNX] ExportedProgram weight serialization support
- [ONNX] Move the graph building logic
- [ONNX] Do not include concrete tensors when we add initializers
- [ONNX] Simplify fake tensor export logic to get rid of the redundant model argument
- [ONNX] Support external tensors in ONNXProgram.save()
- [feature][cudagraph] API to clear a bad recording HOT 2
- [ONNX] pad_sequence() is not exportable, with neither legacy onnx.export nor with dynamo_export
- [dynamo] Dynamic slicing on data-dependent value is not supported (regression from legacy ONNX) HOT 1
- Triton Matrix Multiplication example invalid results (return zeros) on Volta
- pyyaml dependency error on Mac with source installation
- The dynamic compilation does not handle composite shapes with multiple dimensions very effectively HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.