This commit is contained in:
CircleCI Docs
2025-01-09 21:56:20 +00:00
parent 04b749a588
commit d8d647015b
2642 changed files with 137687 additions and 70861 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.21.1 documentation</title>
<title>Build and Install &#8212; MLX 0.22.0 documentation</title>
@@ -16,8 +16,8 @@
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
</script>
<!--
this give us a css class that will be invisible only if js is disabled
<!--
this give us a css class that will be invisible only if js is disabled
-->
<noscript>
<style>
@@ -27,19 +27,19 @@
</noscript>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=26a4bc78f4c0ddb94549" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=26a4bc78f4c0ddb94549" rel="stylesheet" />
<link href="_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=a3416100" />
<!-- So that users can add custom icons -->
<script src="_static/scripts/fontawesome.js?digest=26a4bc78f4c0ddb94549"></script>
<script src="_static/scripts/fontawesome.js?digest=8878045cc6db502f8baf"></script>
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=26a4bc78f4c0ddb94549" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=26a4bc78f4c0ddb94549" />
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf" />
<script src="_static/documentation_options.js?v=acb17c73"></script>
<script src="_static/documentation_options.js?v=c952a61b"></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>
@@ -51,7 +51,7 @@
<link rel="prev" title="MLX" href="index.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="0.21.1" />
<meta name="docsearch:version" content="0.22.0" />
</head>
@@ -130,8 +130,8 @@
<img src="_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.21.1 documentation - Home"/>
<img src="_static/mlx_logo_dark.png" class="logo__image only-dark pst-js-only" alt="MLX 0.21.1 documentation - Home"/>
<img src="_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.22.0 documentation - Home"/>
<img src="_static/mlx_logo_dark.png" class="logo__image only-dark pst-js-only" alt="MLX 0.22.0 documentation - Home"/>
</a></div>
@@ -160,6 +160,7 @@
<li class="toctree-l1"><a class="reference internal" href="usage/numpy.html">Conversion to NumPy and Other Frameworks</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage/distributed.html">Distributed Communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage/using_streams.html">Using Streams</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage/export.html">Exporting Functions</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Examples</span></p>
<ul class="nav bd-sidenav">
@@ -228,6 +229,7 @@
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.Dtype.html">mlx.core.Dtype</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.DtypeCategory.html">mlx.core.DtypeCategory</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.issubdtype.html">mlx.core.issubdtype</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.finfo.html">mlx.core.finfo</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="python/devices_and_streams.html">Devices and Streams</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
@@ -242,6 +244,13 @@
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.synchronize.html">mlx.core.synchronize</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="python/export.html">Export Functions</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.export_function.html">mlx.core.export_function</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.import_function.html">mlx.core.import_function</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.exporter.html">mlx.core.exporter</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.export_to_dot.html">mlx.core.export_to_dot</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="python/ops.html">Operations</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.abs.html">mlx.core.abs</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.add.html">mlx.core.add</a></li>
@@ -324,6 +333,7 @@
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.isneginf.html">mlx.core.isneginf</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.isposinf.html">mlx.core.isposinf</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.issubdtype.html">mlx.core.issubdtype</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.kron.html">mlx.core.kron</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.left_shift.html">mlx.core.left_shift</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.less.html">mlx.core.less</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.less_equal.html">mlx.core.less_equal</a></li>
@@ -379,6 +389,8 @@
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.sign.html">mlx.core.sign</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.sin.html">mlx.core.sin</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.sinh.html">mlx.core.sinh</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.slice.html">mlx.core.slice</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.slice_update.html">mlx.core.slice_update</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.softmax.html">mlx.core.softmax</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.sort.html">mlx.core.sort</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.split.html">mlx.core.split</a></li>
@@ -403,6 +415,7 @@
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.tri.html">mlx.core.tri</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.tril.html">mlx.core.tril</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.triu.html">mlx.core.triu</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.unflatten.html">mlx.core.unflatten</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.var.html">mlx.core.var</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.view.html">mlx.core.view</a></li>
<li class="toctree-l2"><a class="reference internal" href="python/_autosummary/mlx.core.where.html">mlx.core.where</a></li>
@@ -695,6 +708,7 @@
<li class="toctree-l1"><a class="reference internal" href="dev/extensions.html">Custom Extensions in MLX</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/metal_debugger.html">Metal Debugger</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/custom_metal_kernels.html">Custom Metal Kernels</a></li>
<li class="toctree-l1"><a class="reference internal" href="dev/mlx_in_cpp.html">Using MLX in C++</a></li>
</ul>
</div>
@@ -703,9 +717,14 @@
<div class="sidebar-primary-items__end sidebar-primary__section">
<div class="sidebar-primary-item">
<div id="ethical-ad-placement"
class="flat"
data-ea-publisher="readthedocs"
data-ea-type="readthedocs-sidebar"
data-ea-manual="true">
</div></div>
</div>
<div id="rtd-footer-container"></div>
</div>
@@ -861,7 +880,7 @@
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#binary-size-minimization">Binary Size Minimization</a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id2">Troubleshooting</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id3">Troubleshooting</a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#metal-not-found">Metal not found</a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#x86-shell">x86 Shell</a></li>
</ul>
@@ -880,7 +899,7 @@
<article class="bd-article">
<section id="build-and-install">
<h1>Build and Install<a class="headerlink" href="#build-and-install" title="Link to this heading">#</a></h1>
<span id="id1"></span><h1>Build and Install<a class="headerlink" href="#build-and-install" title="Link to this heading">#</a></h1>
<section id="python-installation">
<h2>Python Installation<a class="headerlink" href="#python-installation" title="Link to this heading">#</a></h2>
<p>MLX is available on PyPI. All you have to do to use MLX with your own Apple
@@ -922,7 +941,7 @@ way to do this is with <a class="reference external" href="https://stackoverflow
<h3>Build Requirements<a class="headerlink" href="#build-requirements" title="Link to this heading">#</a></h3>
<ul class="simple">
<li><p>A C++ compiler with C++17 support (e.g. Clang &gt;= 5.0)</p></li>
<li><p><a class="reference external" href="https://cmake.org/">cmake</a> version 3.24 or later, and <code class="docutils literal notranslate"><span class="pre">make</span></code></p></li>
<li><p><a class="reference external" href="https://cmake.org/">cmake</a> version 3.25 or later, and <code class="docutils literal notranslate"><span class="pre">make</span></code></p></li>
<li><p>Xcode &gt;= 15.0 and macOS SDK &gt;= 14.0</p></li>
</ul>
<div class="admonition note">
@@ -986,8 +1005,8 @@ cmake<span class="w"> </span>..<span class="w"> </span><span class="o">&amp;&amp
directory as the executable statically linked to <code class="docutils literal notranslate"><span class="pre">libmlx.a</span></code> or the
preprocessor constant <code class="docutils literal notranslate"><span class="pre">METAL_PATH</span></code> should be defined at build time and it
should point to the path to the built metal library.</p>
<div class="pst-scrollable-table-container"><table class="table" id="id3">
<caption><span class="caption-text">Build Options</span><a class="headerlink" href="#id3" title="Link to this table">#</a></caption>
<div class="pst-scrollable-table-container"><table class="table" id="id4">
<caption><span class="caption-text">Build Options</span><a class="headerlink" href="#id4" title="Link to this table">#</a></caption>
<colgroup>
<col style="width: 75.8%" />
<col style="width: 24.2%" />
@@ -1070,8 +1089,8 @@ application. Once a kernel is compiled, it will be cached by the system. The
Metal kernel cache persists across reboots.</p>
</section>
</section>
<section id="id2">
<h3>Troubleshooting<a class="headerlink" href="#id2" title="Link to this heading">#</a></h3>
<section id="id3">
<h3>Troubleshooting<a class="headerlink" href="#id3" title="Link to this heading">#</a></h3>
<section id="metal-not-found">
<h4>Metal not found<a class="headerlink" href="#metal-not-found" title="Link to this heading">#</a></h4>
<p>You see the following error when you try to build:</p>
@@ -1170,7 +1189,7 @@ wipe your build cache with <code class="docutils literal notranslate"><span clas
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#binary-size-minimization">Binary Size Minimization</a></li>
</ul>
</li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id2">Troubleshooting</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#id3">Troubleshooting</a><ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#metal-not-found">Metal not found</a></li>
<li class="toc-h4 nav-item toc-entry"><a class="reference internal nav-link" href="#x86-shell">x86 Shell</a></li>
</ul>
@@ -1225,8 +1244,8 @@ By MLX Contributors
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<script defer src="_static/scripts/bootstrap.js?digest=26a4bc78f4c0ddb94549"></script>
<script defer src="_static/scripts/pydata-sphinx-theme.js?digest=26a4bc78f4c0ddb94549"></script>
<script defer src="_static/scripts/bootstrap.js?digest=8878045cc6db502f8baf"></script>
<script defer src="_static/scripts/pydata-sphinx-theme.js?digest=8878045cc6db502f8baf"></script>
<footer class="bd-footer">
</footer>