This commit is contained in:
Awni Hannun
2024-09-17 12:06:14 -07:00
committed by CircleCI Docs
parent 27e07888b0
commit 6a6ffb598d
739 changed files with 28107 additions and 8524 deletions

View File

@@ -90,7 +90,7 @@ $(function() { codefold.init(0); });
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;variant&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;<a class="code" href="array_8h.html">mlx/array.h</a>&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;<a class="code" href="load_8h.html">mlx/io/load.h</a>&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;<a class="code" href="io_2load_8h.html">mlx/io/load.h</a>&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &quot;<a class="code" href="stream_8h.html">mlx/stream.h</a>&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;<a class="code" href="utils_8h.html">mlx/utils.h</a>&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
@@ -108,9 +108,9 @@ $(function() { codefold.init(0); });
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a22a37f3e33e0658680f6227bdd2d0b91"> 26</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad4c2cebe9e54582295f98c5a448a1f32">save</a>(std::string file, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> a);</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db"> 29</a></span><a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> <a class="code hl_function" href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db">load</a>(std::shared_ptr&lt;io::Reader&gt; in_stream, <a class="code hl_typedef" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s = {});</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db"> 29</a></span><a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> <a class="code hl_function" href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">load</a>(std::shared_ptr&lt;io::Reader&gt; in_stream, <a class="code hl_typedef" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s = {});</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ac71a08bf4c052ae3c77e9e89cbea071d"> 32</a></span><a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> <a class="code hl_function" href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db">load</a>(std::string file, <a class="code hl_typedef" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s = {});</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ac71a08bf4c052ae3c77e9e89cbea071d"> 32</a></span><a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> <a class="code hl_function" href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">load</a>(std::string file, <a class="code hl_typedef" href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">StreamOrDevice</a> s = {});</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a96cc40e1af8c4626c813ce4859f70a5c"> 35</a></span><a class="code hl_typedef" href="namespacemlx_1_1core.html#a688cd7917b1365065e8059e9964c3d45">SafetensorsLoad</a> <a class="code hl_function" href="namespacemlx_1_1core.html#a96cc40e1af8c4626c813ce4859f70a5c">load_safetensors</a>(</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> std::shared_ptr&lt;io::Reader&gt; in_stream,</div>
@@ -138,17 +138,17 @@ $(function() { codefold.init(0); });
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>} <span class="comment">// namespace mlx::core</span></div>
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:20</div></div>
<div class="ttc" id="aload_8h_html"><div class="ttname"><a href="load_8h.html">load.h</a></div></div>
<div class="ttc" id="aio_2load_8h_html"><div class="ttname"><a href="io_2load_8h.html">load.h</a></div></div>
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a2aa12b351ce559deb14cda0a5292c2ce"><div class="ttname"><a href="namespacemlx_1_1core.html#a2aa12b351ce559deb14cda0a5292c2ce">mlx::core::load_gguf</a></div><div class="ttdeci">GGUFLoad load_gguf(const std::string &amp;file, StreamOrDevice s={})</div><div class="ttdoc">Load array map and metadata from .gguf file format.</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a688cd7917b1365065e8059e9964c3d45"><div class="ttname"><a href="namespacemlx_1_1core.html#a688cd7917b1365065e8059e9964c3d45">mlx::core::SafetensorsLoad</a></div><div class="ttdeci">std::pair&lt; std::unordered_map&lt; std::string, array &gt;, std::unordered_map&lt; std::string, std::string &gt; &gt; SafetensorsLoad</div><div class="ttdef"><b>Definition</b> io.h:18</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a8bcc29ca8846ec99dce333df4a34dc5f"><div class="ttname"><a href="namespacemlx_1_1core.html#a8bcc29ca8846ec99dce333df4a34dc5f">mlx::core::save_gguf</a></div><div class="ttdeci">void save_gguf(std::string file, std::unordered_map&lt; std::string, array &gt; array_map, std::unordered_map&lt; std::string, GGUFMetaData &gt; meta_data={})</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a8c2c1b9a37aadfb48f4c3a7e806e32e3"><div class="ttname"><a href="namespacemlx_1_1core.html#a8c2c1b9a37aadfb48f4c3a7e806e32e3">mlx::core::GGUFMetaData</a></div><div class="ttdeci">std::variant&lt; std::monostate, array, std::string, std::vector&lt; std::string &gt; &gt; GGUFMetaData</div><div class="ttdef"><b>Definition</b> io.h:13</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a954de19249da7c1fa39b89bdc47368aa"><div class="ttname"><a href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">mlx::core::load</a></div><div class="ttdeci">void load(array &amp;out, size_t offset, const std::shared_ptr&lt; io::Reader &gt; &amp;reader, bool swap_endianess)</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a95fc1013cc48fbfee0c54310711a5e58"><div class="ttname"><a href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58">mlx::core::StreamOrDevice</a></div><div class="ttdeci">std::variant&lt; std::monostate, Stream, Device &gt; StreamOrDevice</div><div class="ttdef"><b>Definition</b> utils.h:14</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a96cc40e1af8c4626c813ce4859f70a5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a96cc40e1af8c4626c813ce4859f70a5c">mlx::core::load_safetensors</a></div><div class="ttdeci">SafetensorsLoad load_safetensors(std::shared_ptr&lt; io::Reader &gt; in_stream, StreamOrDevice s={})</div><div class="ttdoc">Load array map from .safetensors file format.</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_a9f158db20c2405557f3ebc397e876de8"><div class="ttname"><a href="namespacemlx_1_1core.html#a9f158db20c2405557f3ebc397e876de8">mlx::core::save_safetensors</a></div><div class="ttdeci">void save_safetensors(std::shared_ptr&lt; io::Writer &gt; in_stream, std::unordered_map&lt; std::string, array &gt;, std::unordered_map&lt; std::string, std::string &gt; metadata={})</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_aa5b0f7f13a941e1f41c411194e9033c7"><div class="ttname"><a href="namespacemlx_1_1core.html#aa5b0f7f13a941e1f41c411194e9033c7">mlx::core::GGUFLoad</a></div><div class="ttdeci">std::pair&lt; std::unordered_map&lt; std::string, array &gt;, std::unordered_map&lt; std::string, GGUFMetaData &gt; &gt; GGUFLoad</div><div class="ttdef"><b>Definition</b> io.h:15</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_abada9bfa834d7423959362386720f3db"><div class="ttname"><a href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db">mlx::core::load</a></div><div class="ttdeci">array load(std::shared_ptr&lt; io::Reader &gt; in_stream, StreamOrDevice s={})</div><div class="ttdoc">Load array from reader in .npy format.</div></div>
<div class="ttc" id="anamespacemlx_1_1core_html_ad4c2cebe9e54582295f98c5a448a1f32"><div class="ttname"><a href="namespacemlx_1_1core.html#ad4c2cebe9e54582295f98c5a448a1f32">mlx::core::save</a></div><div class="ttdeci">void save(std::shared_ptr&lt; io::Writer &gt; out_stream, array a)</div><div class="ttdoc">Save array to out stream in .npy format.</div></div>
<div class="ttc" id="astream_8h_html"><div class="ttname"><a href="stream_8h.html">stream.h</a></div></div>
<div class="ttc" id="autils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div></div>