Skip to content

Commit

Permalink
Docs: Generated docs for v0.10.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfraser committed Feb 15, 2024
1 parent 54557e4 commit 9c99fb4
Show file tree
Hide file tree
Showing 64 changed files with 467 additions and 234 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0c26ac880e1785fd655d98bdaf85b41b
config: a81c8db7bc7a8bd4bd66e17446e21974
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/bit_width/const.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.bit_width.const &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.bit_width.const &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/bit_width/parameter.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.bit_width.parameter &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.bit_width.parameter &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/function_wrapper/clamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.function_wrapper.clamp &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.function_wrapper.clamp &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/function_wrapper/misc.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.function_wrapper.misc &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.function_wrapper.misc &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/function_wrapper/ops_ste.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.function_wrapper.ops_ste &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.function_wrapper.ops_ste &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
36 changes: 32 additions & 4 deletions docs/_modules/brevitas/core/function_wrapper/shape.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.function_wrapper.shape &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.function_wrapper.shape &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down Expand Up @@ -424,6 +424,7 @@ <h1>Source code for brevitas.core.function_wrapper.shape</h1><div class="highlig
<span class="kn">from</span> <span class="nn">brevitas.function.shape</span> <span class="kn">import</span> <span class="n">over_batch_over_output_channels</span>
<span class="kn">from</span> <span class="nn">brevitas.function.shape</span> <span class="kn">import</span> <span class="n">over_batch_over_tensor</span>
<span class="kn">from</span> <span class="nn">brevitas.function.shape</span> <span class="kn">import</span> <span class="n">over_output_channels</span>
<span class="kn">from</span> <span class="nn">brevitas.function.shape</span> <span class="kn">import</span> <span class="n">over_output_features</span>
<span class="kn">from</span> <span class="nn">brevitas.function.shape</span> <span class="kn">import</span> <span class="n">over_tensor</span>


Expand Down Expand Up @@ -536,6 +537,32 @@ <h1>Source code for brevitas.core.function_wrapper.shape</h1><div class="highlig
<span class="k">return</span> <span class="n">y</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span></div></div>


<div class="viewcode-block" id="OverOutputFeaturesView"><a class="viewcode-back" href="../../../../api_reference/brevitas.core.function_wrapper.html#brevitas.core.function_wrapper.shape.OverOutputFeaturesView">[docs]</a><span class="k">class</span> <span class="nc">OverOutputFeaturesView</span><span class="p">(</span><span class="n">brevitas</span><span class="o">.</span><span class="n">jit</span><span class="o">.</span><span class="n">ScriptModule</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> ScriptModule to compute the :func:`~brevitas.function.shape.over_output_features`</span>
<span class="sd"> view of an input tensor.</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; view_module = OverOutputFeaturesView()</span>
<span class="sd"> &gt;&gt;&gt; y = view_module(torch.empty(size=[8, 10, 25]))</span>
<span class="sd"> &gt;&gt;&gt; y.shape</span>
<span class="sd"> torch.Size([80, 25])</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">permute_dims</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="o">...</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="nb">super</span><span class="p">(</span><span class="n">OverOutputFeaturesView</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<span class="k">if</span> <span class="n">permute_dims</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">permute_impl</span> <span class="o">=</span> <span class="n">PermuteDims</span><span class="p">(</span><span class="n">permute_dims</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">permute_impl</span> <span class="o">=</span> <span class="n">Identity</span><span class="p">()</span>

<div class="viewcode-block" id="OverOutputFeaturesView.forward"><a class="viewcode-back" href="../../../../api_reference/brevitas.core.function_wrapper.html#brevitas.core.function_wrapper.shape.OverOutputFeaturesView.forward">[docs]</a> <span class="nd">@brevitas</span><span class="o">.</span><span class="n">jit</span><span class="o">.</span><span class="n">script_method</span>
<span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span>
<span class="n">y</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">permute_impl</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
<span class="n">shape</span> <span class="o">=</span> <span class="n">over_output_features</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
<span class="k">return</span> <span class="n">y</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">shape</span><span class="p">)</span></div></div>


<div class="viewcode-block" id="StatsInputViewShapeImpl"><a class="viewcode-back" href="../../../../api_reference/brevitas.core.function_wrapper.html#brevitas.core.function_wrapper.shape.StatsInputViewShapeImpl">[docs]</a><span class="k">class</span> <span class="nc">StatsInputViewShapeImpl</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Enum-like object to collect pointers to variants of ScriptModules that perform a view on a tensor.</span>
Expand All @@ -544,7 +571,8 @@ <h1>Source code for brevitas.core.function_wrapper.shape</h1><div class="highlig
<span class="n">OVER_TENSOR</span> <span class="o">=</span> <span class="n">OverTensorView</span>
<span class="n">OVER_OUTPUT_CHANNELS</span> <span class="o">=</span> <span class="n">OverOutputChannelView</span>
<span class="n">OVER_BATCH_OVER_TENSOR</span> <span class="o">=</span> <span class="n">OverBatchOverTensorView</span>
<span class="n">OVER_BATCH_OVER_OUTPUT_CHANNELS</span> <span class="o">=</span> <span class="n">OverBatchOverOutputChannelView</span></div>
<span class="n">OVER_BATCH_OVER_OUTPUT_CHANNELS</span> <span class="o">=</span> <span class="n">OverBatchOverOutputChannelView</span>
<span class="n">OVER_OUTPUT_FEATURES</span> <span class="o">=</span> <span class="n">OverOutputFeaturesView</span></div>
</pre></div>

</article>
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/brevitas/core/quant/binary.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.quant.binary &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.quant.binary &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down
8 changes: 4 additions & 4 deletions docs/_modules/brevitas/core/quant/delay.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.quant.delay &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.quant.delay &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down Expand Up @@ -431,7 +431,7 @@ <h1>Source code for brevitas.core.quant.delay</h1><div class="highlight"><pre>
<span class="nb">super</span><span class="p">(</span><span class="n">_DelayQuant</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">quant_delay_steps</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">brevitas</span><span class="o">.</span><span class="n">jit</span><span class="o">.</span><span class="n">Attribute</span><span class="p">(</span><span class="n">quant_delay_steps</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>

<span class="nd">@brevitas</span><span class="o">.</span><span class="n">jit</span><span class="o">.</span><span class="n">script_method_110_disabled</span>
<span class="nd">@brevitas</span><span class="o">.</span><span class="n">jit</span><span class="o">.</span><span class="n">script_method</span>
<span class="k">def</span> <span class="nf">forward</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span> <span class="n">y</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tensor</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">quant_delay_steps</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">quant_delay_steps</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">quant_delay_steps</span> <span class="o">-</span> <span class="mi">1</span>
Expand Down
10 changes: 5 additions & 5 deletions docs/_modules/brevitas/core/quant/int.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brevitas.core.quant.int &#8212; Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation</title>
<title>brevitas.core.quant.int &#8212; Brevitas 0.10.1 documentation</title>



Expand Down Expand Up @@ -123,8 +123,8 @@



<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.0b1.dev37+g993c869.d20231123 documentation - Home"/>`);</script>
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.10.1 documentation - Home"/>
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.10.1 documentation - Home"/>`);</script>


</a></div>
Expand Down Expand Up @@ -429,7 +429,7 @@ <h1>Source code for brevitas.core.quant.int</h1><div class="highlight"><pre>
<span class="sd"> :class:`~brevitas.core.quant.IntQuant`. Zero-point is set to zero, scale is taken as input,</span>
<span class="sd"> bit-width is computed from an input bit-width.</span>

<span class="sd"> Args:</span>
<span class="sd"> Args:</span>
<span class="sd"> int_quant (Module): Module that implements integer quantization.</span>
<span class="sd"> bit_width_impl (Module): Module that takes the input bit-width in and returns the bit-width</span>
<span class="sd"> to be used for quantization.</span>
Expand Down Expand Up @@ -499,7 +499,7 @@ <h1>Source code for brevitas.core.quant.int</h1><div class="highlight"><pre>
<span class="sd"> :class:`~brevitas.core.quant.IntQuant`. Scale, zero-point and bit-width are returned from their</span>
<span class="sd"> respective implementations and passed on to the integer quantization implementation.</span>

<span class="sd"> Args:</span>
<span class="sd"> Args:</span>
<span class="sd"> int_quant (Module): Module that implements integer quantization.</span>
<span class="sd"> scaling_impl (Module): Module that takes in the input to quantize and returns a scale factor,</span>
<span class="sd"> here interpreted as threshold on the floating-point range of quantization.</span>
Expand Down
Loading

0 comments on commit 9c99fb4

Please sign in to comment.