Skip to content

Commit

Permalink
新增计算带宽
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinwei committed Jan 18, 2024
1 parent 0291c47 commit 388410d
Show file tree
Hide file tree
Showing 27 changed files with 28,719 additions and 200 deletions.
8 changes: 4 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"sphinx.ext.autosummary",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
# "sphinx.ext.todo",
"sphinx.ext.todo",
"sphinxcontrib.bibtex",
# "sphinx_togglebutton",
# "sphinx.ext.viewcode",
Expand Down Expand Up @@ -274,8 +274,6 @@
# -- 自定义网站的标题 --------------
# html_title = '动手学习 Python'

# todo_include_todos = True

# 如果你希望stderr和stdout中的每个输出都被合并成一个流,请使用以下配置。
# 避免将 jupter 执行报错的信息输出到 cmd
nb_merge_streams = True
Expand All @@ -288,4 +286,6 @@
bibtex_reference_style = "author_year"
graphviz_output_format = 'svg'

numfig = True
numfig = True
todo_include_todos = True
navigation_with_keys = True
22 changes: 22 additions & 0 deletions doc/design/complexity/DMAs.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DMAs\n",
"\n",
"DMAs:直接内存访问(direct memory accesses)\n",
"\n",
"参考:[DMAs](https://en.wikipedia.org/wiki/Direct_memory_access)"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
1,739 changes: 1,739 additions & 0 deletions doc/design/complexity/FLOPs.ipynb

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions doc/design/complexity/MACs.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# MACs\n",
"\n",
"参考:[MACs](https://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation)\n",
"\n",
"MACs: mutiply-accumulate operations \n",
"\n",
"在计算中,特别是在数字信号处理中,乘法累加(MAC)或乘法加法(MAD)运算是常见的步骤,用于计算两个数的乘积并将该乘积添加到累加器中。执行此操作的硬件单元称为乘法累加器(MAC 单元);该操作本身也经常被称为 MAC 或 MAD 操作。MAC 操作修改累加器 `a`:\n",
"\n",
"$$\n",
"a \\leftarrow a + (b \\times c)\n",
"$$\n",
"\n",
"当使用浮点数时,可能会执行两次舍入(在许多 [DSPs](https://en.wikipedia.org/wiki/Digital_signal_processors) 中是典型的),或只执行一次舍入。当只执行一次舍入时,它被称为融合乘法加法(FMA)或融合乘法累加(FMAC)。现代计算机可能包含专用的 MAC,由组合逻辑实现的乘法器、加法器和存储结果的累加器寄存器组成。寄存器的输出反馈到加法器的输入端,因此每个时钟周期,乘法器的输出被添加到寄存器中。组合乘法器需要大量的逻辑,但可以比早期计算机的典型移位和相加方法更快地计算乘积。"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
8 changes: 8 additions & 0 deletions doc/design/complexity/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 复杂度

```{toctree}
FLOPs
MACs
DMAs
```

3 changes: 2 additions & 1 deletion doc/design/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 设计

```{toctree}
intro
intro-old
complexity/index
models/index
```
Loading

0 comments on commit 388410d

Please sign in to comment.