tensorflow / probability

Probabilistic reasoning and statistical analysis in TensorFlow
https://www.tensorflow.org/probability/
Apache License 2.0
4.16k stars 1.08k forks source link

mlx backend #1802

Open krzysztofrusek opened 3 months ago

krzysztofrusek commented 3 months ago

Are there any plans to include ml-explore/mlx as tfp backend? It would be great for mac users running statistical computations locally. If there are no such plans, I would be grateful for hints on how to add it, since the backend system has no public API.

brianwa84 commented 3 months ago

There are not currently such plans. Testing might be quite challenging, unless MLX provides an emulator?

The best documentation about multi-backend support is in here: https://github.com/tensorflow/probability/blob/main/SUBSTRATES.md

You would need to work with bazel directly to compile and run some tests locally, since the backends are compiled by rewriting TFP code into new submodules. IIRC TFP's BUILD rules are incompatible with the latest bazel for some reason: https://github.com/tensorflow/probability/blob/main/testing/run_github_tests.sh#L27

Feel free to post back w/ questions if you start seriously pursuing.

Brian Patton | Software Engineer | @.***

On Fri, Mar 22, 2024 at 3:05 AM Krzysztof Rusek @.***> wrote:

Are there any plans to include ml-explore/mlx https://github.com/ml-explore/mlx as tfp backend? It would be great for mac users running statistical computations locally. If there are no such plans, I would be grateful for hints on how to add it, since the backend system has no public API.

— Reply to this email directly, view it on GitHub https://github.com/tensorflow/probability/issues/1802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJFSI2ORSI6MT5HMCXUIYTYZPJ47AVCNFSM6AAAAABFCZMPG2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDCOBTHAZDAMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>