mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-11-04 18:48:15 +08:00 
			
		
		
		
	docs update
This commit is contained in:
		
				
					committed by
					
						
						CircleCI Docs
					
				
			
			
				
	
			
			
			
						parent
						
							ee4f4e3816
						
					
				
				
					commit
					44a49282c9
				
			
							
								
								
									
										44
									
								
								docs/build/html/fast__primitives_8h_source.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								docs/build/html/fast__primitives_8h_source.html
									
									
									
									
										vendored
									
									
								
							@@ -339,11 +339,52 @@ $(function() { codefold.init(0); });
 | 
			
		||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>};</div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span> </div>
 | 
			
		||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>} <span class="comment">// namespace mlx::core::fast</span></div>
 | 
			
		||||
<div class="foldopen" id="foldopen00215" data-start="{" data-end="};">
 | 
			
		||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html">  215</a></span><span class="keyword">class </span><a class="code hl_class" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html">AffineQuantize</a> : <span class="keyword">public</span> <a class="code hl_class" href="classmlx_1_1core_1_1fast_1_1_custom.html">Custom</a> {</div>
 | 
			
		||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span> <span class="keyword">public</span>:</div>
 | 
			
		||||
<div class="foldopen" id="foldopen00217" data-start="{" data-end="}">
 | 
			
		||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a84d5fa9e8c3de407fbcc5f38d2ed1473">  217</a></span>  <span class="keyword">explicit</span> <a class="code hl_function" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a84d5fa9e8c3de407fbcc5f38d2ed1473">AffineQuantize</a>(</div>
 | 
			
		||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>      <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="code hl_function" href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">stream</a>,</div>
 | 
			
		||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>      std::function<std::vector<array>(std::vector<array>)> fallback,</div>
 | 
			
		||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>      <span class="keywordtype">int</span> group_size,</div>
 | 
			
		||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>      <span class="keywordtype">int</span> bits,</div>
 | 
			
		||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>      <span class="keywordtype">bool</span> <a class="code hl_function" href="group__ops.html#gabff758a5c1ce32ad7e8b78aba0164077">dequantize</a>)</div>
 | 
			
		||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>      : <a class="code hl_class" href="classmlx_1_1core_1_1fast_1_1_custom.html">Custom</a>(<a class="code hl_function" href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">stream</a>, fallback),</div>
 | 
			
		||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>        group_size_(group_size),</div>
 | 
			
		||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>        bits_(bits),</div>
 | 
			
		||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>        dequantize_(<a class="code hl_function" href="group__ops.html#gabff758a5c1ce32ad7e8b78aba0164077">dequantize</a>) {}</div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span> </div>
 | 
			
		||||
<div class="foldopen" id="foldopen00228" data-start="{" data-end="}">
 | 
			
		||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a3b5d628628d245b38911118d4a0ff9fd">  228</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a3b5d628628d245b38911118d4a0ff9fd">eval_cpu</a>(<span class="keyword">const</span> std::vector<array>& inputs, std::vector<array>& outputs)<span class="keyword"></span></div>
 | 
			
		||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span><span class="keyword">      override </span>{</div>
 | 
			
		||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>    <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"NYI"</span>);</div>
 | 
			
		||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>  }</div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span> </div>
 | 
			
		||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a63812b2abaf26ad7e7fa4c9e82db1628">  233</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a63812b2abaf26ad7e7fa4c9e82db1628">eval_gpu</a>(<span class="keyword">const</span> std::vector<array>& inputs, std::vector<array>& outputs)</div>
 | 
			
		||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span>      <span class="keyword">override</span>;</div>
 | 
			
		||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span> </div>
 | 
			
		||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a4b8f1b1f633002c8ca6fa8f0ef4dd587">  236</a></span>  <a class="code hl_function" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a4b8f1b1f633002c8ca6fa8f0ef4dd587">DEFINE_PRINT</a>(<a class="code hl_class" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html">AffineQuantize</a>);</div>
 | 
			
		||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span> </div>
 | 
			
		||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> <span class="keyword">private</span>:</div>
 | 
			
		||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>  std::function<std::vector<array>(std::vector<array>)> fallback_;</div>
 | 
			
		||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>  <span class="keywordtype">int</span> group_size_;</div>
 | 
			
		||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>  <span class="keywordtype">int</span> bits_;</div>
 | 
			
		||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>  <span class="keywordtype">bool</span> dequantize_;</div>
 | 
			
		||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>};</div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span> </div>
 | 
			
		||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>} <span class="comment">// namespace mlx::core::fast</span></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></div><div class="ttdef"><b>Definition</b> primitives.h:48</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html_a46e6257397a662528f9f831842ac456a"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">mlx::core::Primitive::stream</a></div><div class="ttdeci">const Stream & stream()</div><div class="ttdoc">The stream the primitive will run on.</div><div class="ttdef"><b>Definition</b> primitives.h:58</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html_a6140a502af4c2bbbc776ab26e9afebcd"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html#a6140a502af4c2bbbc776ab26e9afebcd">mlx::core::Primitive::is_equivalent</a></div><div class="ttdeci">virtual bool is_equivalent(const Primitive &other) const</div><div class="ttdoc">Equivalence check defaults to false unless overridden by the primitive.</div><div class="ttdef"><b>Definition</b> primitives.h:107</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="aclassmlx_1_1core_1_1fast_1_1_affine_quantize_html"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html">mlx::core::fast::AffineQuantize</a></div><div class="ttdef"><b>Definition</b> fast_primitives.h:215</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_affine_quantize_html_a3b5d628628d245b38911118d4a0ff9fd"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a3b5d628628d245b38911118d4a0ff9fd">mlx::core::fast::AffineQuantize::eval_cpu</a></div><div class="ttdeci">void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override</div><div class="ttdoc">A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...</div><div class="ttdef"><b>Definition</b> fast_primitives.h:228</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_affine_quantize_html_a4b8f1b1f633002c8ca6fa8f0ef4dd587"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a4b8f1b1f633002c8ca6fa8f0ef4dd587">mlx::core::fast::AffineQuantize::DEFINE_PRINT</a></div><div class="ttdeci">DEFINE_PRINT(AffineQuantize)</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_affine_quantize_html_a63812b2abaf26ad7e7fa4c9e82db1628"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a63812b2abaf26ad7e7fa4c9e82db1628">mlx::core::fast::AffineQuantize::eval_gpu</a></div><div class="ttdeci">void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_affine_quantize_html_a84d5fa9e8c3de407fbcc5f38d2ed1473"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a84d5fa9e8c3de407fbcc5f38d2ed1473">mlx::core::fast::AffineQuantize::AffineQuantize</a></div><div class="ttdeci">AffineQuantize(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, int group_size, int bits, bool dequantize)</div><div class="ttdef"><b>Definition</b> fast_primitives.h:217</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_custom_html"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_custom.html">mlx::core::fast::Custom</a></div><div class="ttdef"><b>Definition</b> fast_primitives.h:10</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_custom_html_a4186fea23f7156c38960426821fca313"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_custom.html#a4186fea23f7156c38960426821fca313">mlx::core::fast::Custom::Custom</a></div><div class="ttdeci">Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)</div><div class="ttdef"><b>Definition</b> fast_primitives.h:12</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_custom_html_a74be4bcd0382f7f6400bf73fd5569c91"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_custom.html#a74be4bcd0382f7f6400bf73fd5569c91">mlx::core::fast::Custom::vjp</a></div><div class="ttdeci">virtual std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override</div><div class="ttdoc">The vector-Jacobian product.</div></div>
 | 
			
		||||
@@ -384,6 +425,7 @@ $(function() { codefold.init(0); });
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention_html_ad51666e69f670e286293aff96eb435a9"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ad51666e69f670e286293aff96eb435a9">mlx::core::fast::ScaledDotProductAttention::eval_gpu</a></div><div class="ttdeci">void eval_gpu(const std::vector< array > &inputs, array &out)</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention_html_ae20851e002f7fcb6d4f97817596f6328"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ae20851e002f7fcb6d4f97817596f6328">mlx::core::fast::ScaledDotProductAttention::eval_cpu</a></div><div class="ttdeci">void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override</div><div class="ttdoc">A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...</div><div class="ttdef"><b>Definition</b> fast_primitives.h:194</div></div>
 | 
			
		||||
<div class="ttc" id="aclassmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention_html_af08b1294f3f93505a96fdfa85b1edd62"><div class="ttname"><a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#af08b1294f3f93505a96fdfa85b1edd62">mlx::core::fast::ScaledDotProductAttention::is_equivalent</a></div><div class="ttdeci">bool is_equivalent(const Primitive &other) const override</div><div class="ttdoc">Equivalence check defaults to false unless overridden by the primitive.</div></div>
 | 
			
		||||
<div class="ttc" id="agroup__ops_html_gabff758a5c1ce32ad7e8b78aba0164077"><div class="ttname"><a href="group__ops.html#gabff758a5c1ce32ad7e8b78aba0164077">mlx::core::dequantize</a></div><div class="ttdeci">array dequantize(const array &w, const array &scales, const array &biases, int group_size=64, int bits=4, StreamOrDevice s={})</div><div class="ttdoc">Dequantize a matrix produced by quantize()</div></div>
 | 
			
		||||
<div class="ttc" id="anamespacemlx_1_1core_1_1fast_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1fast.html">mlx::core::fast</a></div><div class="ttdef"><b>Definition</b> fast.h:9</div></div>
 | 
			
		||||
<div class="ttc" id="aprimitives_8h_html"><div class="ttname"><a href="primitives_8h.html">primitives.h</a></div></div>
 | 
			
		||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user