Skip to content

Commit de137b9

Browse files
authored
Docs: update / generate docs for 0.12.0 release (#1284)
1 parent 18c601b commit de137b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3176
-1007
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ If you like this project please consider ⭐ this repo, as it is the simplest an
1313

1414
## Requirements
1515

16-
* Python >= 3.8.
17-
* [Pytorch](https://pytorch.org) >= 1.9.1, <= 2.1 (more recent versions would be untested).
16+
* Python >= 3.9.
17+
* [Pytorch](https://pytorch.org) >= 1.9.1, <= 2.4 (more recent versions would be untested).
1818
* Windows, Linux or macOS.
1919
* GPU training-time acceleration (*Optional* but recommended).
2020

@@ -50,6 +50,7 @@ If you adopt Brevitas in your work, please cite it as:
5050

5151
## History
5252

53+
- *2025/05/09* - Release version 0.12.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.12.0).
5354
- *2024/10/10* - Release version 0.11.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.11.0).
5455
- *2024/07/23* - Minor release version 0.10.3, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.3).
5556
- *2024/02/19* - Minor release version 0.10.2, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.2).

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 029b3c75722303c51813ef033f4d07df
3+
config: 14f9352a3a2718fcb5a14a4c58dc386d
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_modules/brevitas/core/bit_width/const.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<head>
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<title>brevitas.core.bit_width.const &#8212; Brevitas 0.11.0 documentation</title>
11+
<title>brevitas.core.bit_width.const &#8212; Brevitas 0.12.0 documentation</title>
1212

1313

1414

@@ -123,8 +123,8 @@
123123

124124

125125

126-
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.11.0 documentation - Home"/>
127-
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.11.0 documentation - Home"/>`);</script>
126+
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.12.0 documentation - Home"/>
127+
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.12.0 documentation - Home"/>`);</script>
128128

129129

130130
</a></div>
@@ -180,8 +180,8 @@
180180

181181

182182
<li class="nav-item">
183-
<a class="nav-link nav-internal" href="../../../../architecture.html">
184-
Architecture
183+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
184+
User Guides
185185
</a>
186186
</li>
187187

@@ -312,8 +312,8 @@
312312

313313

314314
<li class="nav-item">
315-
<a class="nav-link nav-internal" href="../../../../architecture.html">
316-
Architecture
315+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
316+
User Guides
317317
</a>
318318
</li>
319319

docs/_modules/brevitas/core/bit_width/parameter.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<head>
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<title>brevitas.core.bit_width.parameter &#8212; Brevitas 0.11.0 documentation</title>
11+
<title>brevitas.core.bit_width.parameter &#8212; Brevitas 0.12.0 documentation</title>
1212

1313

1414

@@ -123,8 +123,8 @@
123123

124124

125125

126-
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.11.0 documentation - Home"/>
127-
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.11.0 documentation - Home"/>`);</script>
126+
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.12.0 documentation - Home"/>
127+
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.12.0 documentation - Home"/>`);</script>
128128

129129

130130
</a></div>
@@ -180,8 +180,8 @@
180180

181181

182182
<li class="nav-item">
183-
<a class="nav-link nav-internal" href="../../../../architecture.html">
184-
Architecture
183+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
184+
User Guides
185185
</a>
186186
</li>
187187

@@ -312,8 +312,8 @@
312312

313313

314314
<li class="nav-item">
315-
<a class="nav-link nav-internal" href="../../../../architecture.html">
316-
Architecture
315+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
316+
User Guides
317317
</a>
318318
</li>
319319

docs/_modules/brevitas/core/function_wrapper/clamp.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<head>
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<title>brevitas.core.function_wrapper.clamp &#8212; Brevitas 0.11.0 documentation</title>
11+
<title>brevitas.core.function_wrapper.clamp &#8212; Brevitas 0.12.0 documentation</title>
1212

1313

1414

@@ -123,8 +123,8 @@
123123

124124

125125

126-
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.11.0 documentation - Home"/>
127-
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.11.0 documentation - Home"/>`);</script>
126+
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.12.0 documentation - Home"/>
127+
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.12.0 documentation - Home"/>`);</script>
128128

129129

130130
</a></div>
@@ -180,8 +180,8 @@
180180

181181

182182
<li class="nav-item">
183-
<a class="nav-link nav-internal" href="../../../../architecture.html">
184-
Architecture
183+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
184+
User Guides
185185
</a>
186186
</li>
187187

@@ -312,8 +312,8 @@
312312

313313

314314
<li class="nav-item">
315-
<a class="nav-link nav-internal" href="../../../../architecture.html">
316-
Architecture
315+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
316+
User Guides
317317
</a>
318318
</li>
319319

@@ -551,18 +551,18 @@ <h1>Source code for brevitas.core.function_wrapper.clamp</h1><div class="highlig
551551
<span class="bp">self</span><span class="p">,</span>
552552
<span class="n">x</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span>
553553
<span class="n">exponent_bit_width</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span>
554-
<span class="n">mantissa_bit_width</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span>
554+
<span class="n">pre_compute_max_mantissa</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">,</span>
555555
<span class="n">exponent_bias</span><span class="p">:</span> <span class="n">Tensor</span><span class="p">):</span>
556556

557-
<span class="n">max_value</span> <span class="o">=</span> <span class="n">max_float</span><span class="p">(</span><span class="n">exponent_bit_width</span><span class="p">,</span> <span class="n">mantissa_bit_width</span><span class="p">,</span> <span class="n">exponent_bias</span><span class="p">)</span>
557+
<span class="n">max_value</span> <span class="o">=</span> <span class="n">max_float</span><span class="p">(</span><span class="n">exponent_bit_width</span><span class="p">,</span> <span class="n">pre_compute_max_mantissa</span><span class="p">,</span> <span class="n">exponent_bias</span><span class="p">)</span>
558558
<span class="n">max_value</span> <span class="o">=</span> <span class="n">max_value</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_available_float</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">torch</span><span class="o">.</span><span class="n">min</span><span class="p">(</span>
559559
<span class="n">max_value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_available_float</span><span class="p">())</span>
560560
<span class="n">min_value</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">tensor</span><span class="p">(</span><span class="mf">0.</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">signed</span> <span class="k">else</span> <span class="o">-</span><span class="n">max_value</span>
561561

562562
<span class="c1"># Compute masks</span>
563563
<span class="n">inf_mask</span> <span class="o">=</span> <span class="n">x</span><span class="o">.</span><span class="n">isinf</span><span class="p">()</span>
564564
<span class="n">p_max_val_mask</span> <span class="o">=</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="n">max_value</span>
565-
<span class="n">n_max_val_mask</span> <span class="o">=</span> <span class="o">-</span><span class="n">x</span> <span class="o">&gt;</span> <span class="n">max_value</span>
565+
<span class="n">n_max_val_mask</span> <span class="o">=</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">min_value</span>
566566

567567
<span class="c1"># first clamp everything to +- max_value, basically the saturating case</span>
568568
<span class="n">x</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">saturating_clamp</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">max_value</span><span class="p">,</span> <span class="n">min_value</span><span class="p">)</span>

docs/_modules/brevitas/core/function_wrapper/misc.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<head>
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<title>brevitas.core.function_wrapper.misc &#8212; Brevitas 0.11.0 documentation</title>
11+
<title>brevitas.core.function_wrapper.misc &#8212; Brevitas 0.12.0 documentation</title>
1212

1313

1414

@@ -123,8 +123,8 @@
123123

124124

125125

126-
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.11.0 documentation - Home"/>
127-
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.11.0 documentation - Home"/>`);</script>
126+
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.12.0 documentation - Home"/>
127+
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.12.0 documentation - Home"/>`);</script>
128128

129129

130130
</a></div>
@@ -180,8 +180,8 @@
180180

181181

182182
<li class="nav-item">
183-
<a class="nav-link nav-internal" href="../../../../architecture.html">
184-
Architecture
183+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
184+
User Guides
185185
</a>
186186
</li>
187187

@@ -312,8 +312,8 @@
312312

313313

314314
<li class="nav-item">
315-
<a class="nav-link nav-internal" href="../../../../architecture.html">
316-
Architecture
315+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
316+
User Guides
317317
</a>
318318
</li>
319319

docs/_modules/brevitas/core/function_wrapper/ops_ste.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<head>
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<title>brevitas.core.function_wrapper.ops_ste &#8212; Brevitas 0.11.0 documentation</title>
11+
<title>brevitas.core.function_wrapper.ops_ste &#8212; Brevitas 0.12.0 documentation</title>
1212

1313

1414

@@ -123,8 +123,8 @@
123123

124124

125125

126-
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.11.0 documentation - Home"/>
127-
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.11.0 documentation - Home"/>`);</script>
126+
<img src="../../../../_static/brevitas_logo_black.svg" class="logo__image only-light" alt="Brevitas 0.12.0 documentation - Home"/>
127+
<script>document.write(`<img src="../../../../_static/brevitas_logo_white.svg" class="logo__image only-dark" alt="Brevitas 0.12.0 documentation - Home"/>`);</script>
128128

129129

130130
</a></div>
@@ -180,8 +180,8 @@
180180

181181

182182
<li class="nav-item">
183-
<a class="nav-link nav-internal" href="../../../../architecture.html">
184-
Architecture
183+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
184+
User Guides
185185
</a>
186186
</li>
187187

@@ -312,8 +312,8 @@
312312

313313

314314
<li class="nav-item">
315-
<a class="nav-link nav-internal" href="../../../../architecture.html">
316-
Architecture
315+
<a class="nav-link nav-internal" href="../../../../user_guide/index.html">
316+
User Guides
317317
</a>
318318
</li>
319319

0 commit comments

Comments
 (0)