This commit is contained in:
Awni Hannun 2023-11-30 11:55:34 -08:00 committed by CircleCI Docs
parent 372f2ac025
commit e84ebcf0b9
5 changed files with 28 additions and 9 deletions

View File

@ -4,12 +4,12 @@ Build and Install
Install from PyPI Install from PyPI
----------------- -----------------
MLX is available at Apple's internal PyPI repository. All you have to do to use MLX is available on PyPI. All you have to do to use MLX with your own Apple
MLX with your own Apple silicon computer is silicon computer is
.. code-block:: shell .. code-block:: shell
pip install apple-mlx -i https://pypi.apple.com/simple pip install mlx
Build from source Build from source
----------------- -----------------
@ -46,6 +46,17 @@ Then simply build and install it using pip:
env CMAKE_BUILD_PARALLEL_LEVEL="" pip install . env CMAKE_BUILD_PARALLEL_LEVEL="" pip install .
For developing use an editable install:
.. code-block:: shell
env CMAKE_BUILD_PARALLEL_LEVEL="" pip install -e .
To make sure the install is working run the tests with:
.. code-block:: shell
python -m unittest discover python/tests
C++ API C++ API
^^^^^^^ ^^^^^^^

View File

@ -13,7 +13,7 @@ The main differences between MLX and NumPy are:
and computation graph optimization. and computation graph optimization.
- **Lazy computation**: Computations in MLX are lazy. Arrays are only - **Lazy computation**: Computations in MLX are lazy. Arrays are only
materialized when needed. materialized when needed.
- **Multi-device**: Operations can run on any of the suppoorted devices (CPU, - **Multi-device**: Operations can run on any of the supported devices (CPU,
GPU, ...) GPU, ...)
The design of MLX is strongly inspired by frameworks like `PyTorch The design of MLX is strongly inspired by frameworks like `PyTorch

View File

@ -118,9 +118,9 @@
<h1>Build and Install<a class="headerlink" href="#build-and-install" title="Permalink to this heading"></a></h1> <h1>Build and Install<a class="headerlink" href="#build-and-install" title="Permalink to this heading"></a></h1>
<section id="install-from-pypi"> <section id="install-from-pypi">
<h2>Install from PyPI<a class="headerlink" href="#install-from-pypi" title="Permalink to this heading"></a></h2> <h2>Install from PyPI<a class="headerlink" href="#install-from-pypi" title="Permalink to this heading"></a></h2>
<p>MLX is available at Apples internal PyPI repository. All you have to do to use <p>MLX is available on PyPI. All you have to do to use MLX with your own Apple
MLX with your own Apple silicon computer is</p> silicon computer is</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>apple-mlx<span class="w"> </span>-i<span class="w"> </span>https://pypi.apple.com/simple <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>mlx
</pre></div> </pre></div>
</div> </div>
</section> </section>
@ -151,6 +151,14 @@ brew<span class="w"> </span>install<span class="w"> </span>pybind11
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>env<span class="w"> </span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>. <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>env<span class="w"> </span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>.
</pre></div> </pre></div>
</div> </div>
<p>For developing use an editable install:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>env<span class="w"> </span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
</pre></div>
</div>
<p>To make sure the install is working run the tests with:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>unittest<span class="w"> </span>discover<span class="w"> </span>python/tests
</pre></div>
</div>
</section> </section>
<section id="c-api"> <section id="c-api">
<h3>C++ API<a class="headerlink" href="#c-api" title="Permalink to this heading"></a></h3> <h3>C++ API<a class="headerlink" href="#c-api" title="Permalink to this heading"></a></h3>

View File

@ -124,7 +124,7 @@ transformations for automatic differentiation, automatic vectorization,
and computation graph optimization.</p></li> and computation graph optimization.</p></li>
<li><p><strong>Lazy computation</strong>: Computations in MLX are lazy. Arrays are only <li><p><strong>Lazy computation</strong>: Computations in MLX are lazy. Arrays are only
materialized when needed.</p></li> materialized when needed.</p></li>
<li><p><strong>Multi-device</strong>: Operations can run on any of the suppoorted devices (CPU, <li><p><strong>Multi-device</strong>: Operations can run on any of the supported devices (CPU,
GPU, …)</p></li> GPU, …)</p></li>
</ul> </ul>
</div></blockquote> </div></blockquote>

File diff suppressed because one or more lines are too long