This commit is contained in:
CircleCI Docs
2025-07-08 21:32:22 +00:00
parent cfe36c4c52
commit 62d1612ba9
530 changed files with 2152 additions and 2122 deletions

View File

@@ -8,7 +8,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Build and Install &#8212; MLX 0.26.2 documentation</title>
<title>Build and Install &#8212; MLX 0.26.3 documentation</title>
@@ -36,7 +36,7 @@
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
<script src="_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
<script src="_static/documentation_options.js?v=20507f52"></script>
<script src="_static/documentation_options.js?v=9bacfd4f"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
@@ -137,8 +137,8 @@
<img src="_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.26.2 documentation - Home"/>
<script>document.write(`<img src="_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.26.2 documentation - Home"/>`);</script>
<img src="_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.26.3 documentation - Home"/>
<script>document.write(`<img src="_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.26.3 documentation - Home"/>`);</script>
</a></div>
@@ -1005,16 +1005,16 @@ the output of <code class="docutils literal notranslate"><span class="pre">uname
</pre></div>
</div>
<p>Then simply build and install MLX using pip:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="m">8</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>pip<span class="w"> </span>install<span class="w"> </span>.
</pre></div>
</div>
<p>For developing, install the package with development dependencies, and use an
editable install:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="m">8</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;.[dev]&quot;</span>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;.[dev]&quot;</span>
</pre></div>
</div>
<p>Once the development dependencies are installed, you can build faster with:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="m">8</span><span class="w"> </span>python<span class="w"> </span>setup.py<span class="w"> </span>build_ext<span class="w"> </span>--inplace
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>setup.py<span class="w"> </span>build_ext<span class="w"> </span>--inplace
</pre></div>
</div>
<p>Run the tests with:</p>
@@ -1159,7 +1159,7 @@ apt-get<span class="w"> </span>install<span class="w"> </span>libblas-dev<span c
</div>
<p>When building either the Python or C++ APIs make sure to pass the cmake flag
<code class="docutils literal notranslate"><span class="pre">MLX_BUILD_CUDA=ON</span></code>. For example, to build the Python API run:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_BUILD_PARALLEL_LEVEL</span><span class="o">=</span><span class="m">8</span><span class="w"> </span><span class="nv">CMAKE_ARGS</span><span class="o">=</span><span class="s2">&quot;-DMLX_BUILD_CUDA=ON&quot;</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;.[dev]&quot;</span>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">CMAKE_ARGS</span><span class="o">=</span><span class="s2">&quot;-DMLX_BUILD_CUDA=ON&quot;</span><span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;.[dev]&quot;</span>
</pre></div>
</div>
<p>To build the C++ package run:</p>