Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Update Performance Figures #171

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Operators will be implemented according to [OperatorList.md](./OperatorList.md).

The following chart shows the speedup of FlagGems compared with PyTorch ATen library in eager mode. The speedup is calculated by averaging the speedup on each shape, representing the overall performance of the operator.

![Operator Speedup](./assets/speedup-0708-eng.png)
![Operator Speedup](./assets/speedup-0814-eng.png)

## Contributions

Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pip install .

FlagGems相比Torch Eager模式下ATen算子库的加速比如下图所示。其中,每个算子的加速比综合了多个形状测例的数据,代表该算子的整体性能。

![算子加速比](./assets/speedup-0708-chn.png)
![算子加速比](./assets/speedup-0814-chn.png)

## 贡献代码

Expand Down
Binary file added assets/speedup-0814-chn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/speedup-0814-eng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions src/flag_gems/ops/argmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ def heur_block_n(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_warps=8),
triton.Config({"BLOCK_M": 16}, num_warps=8),
triton.Config({"BLOCK_M": 32}, num_warps=8),
],
key=[
"M",
Expand Down
9 changes: 3 additions & 6 deletions src/flag_gems/ops/cumsum.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ def heur_block_n(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_warps=8),
triton.Config({"BLOCK_M": 16}, num_warps=8),
triton.Config({"BLOCK_M": 32}, num_warps=8),
],
key=[
"M",
Expand Down
24 changes: 8 additions & 16 deletions src/flag_gems/ops/log_softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ def heur_num_warps(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 1}, num_stages=4),
triton.Config({"BLOCK_M": 1}, num_stages=5),
triton.Config({"BLOCK_M": 2}, num_stages=4),
triton.Config({"BLOCK_M": 2}, num_stages=5),
triton.Config({"BLOCK_M": 4}, num_stages=4),
triton.Config({"BLOCK_M": 4}, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_stages=5),
triton.Config({"BLOCK_M": 1}),
triton.Config({"BLOCK_M": 2}),
triton.Config({"BLOCK_M": 4}),
triton.Config({"BLOCK_M": 8}),
],
key=[
"M",
Expand Down Expand Up @@ -72,14 +68,10 @@ def log_softmax_kernel(
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 1}, num_stages=4),
triton.Config({"BLOCK_M": 1}, num_stages=5),
triton.Config({"BLOCK_M": 2}, num_stages=4),
triton.Config({"BLOCK_M": 2}, num_stages=5),
triton.Config({"BLOCK_M": 4}, num_stages=4),
triton.Config({"BLOCK_M": 4}, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_stages=5),
triton.Config({"BLOCK_M": 1}),
triton.Config({"BLOCK_M": 2}),
triton.Config({"BLOCK_M": 4}),
triton.Config({"BLOCK_M": 8}),
],
key=[
"M",
Expand Down
9 changes: 3 additions & 6 deletions src/flag_gems/ops/max.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ def heur_block_n(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_warps=8),
triton.Config({"BLOCK_M": 16}, num_warps=8),
triton.Config({"BLOCK_M": 32}, num_warps=8),
],
key=[
"M",
Expand Down
9 changes: 3 additions & 6 deletions src/flag_gems/ops/min.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ def heur_block_n(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_warps=8),
triton.Config({"BLOCK_M": 16}, num_warps=8),
triton.Config({"BLOCK_M": 32}, num_warps=8),
],
key=[
"M",
Expand Down
9 changes: 3 additions & 6 deletions src/flag_gems/ops/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ def heur_block_n(args):
@libentry()
@triton.autotune(
configs=[
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 8}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 16}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=4),
triton.Config({"BLOCK_M": 32}, num_warps=8, num_stages=5),
triton.Config({"BLOCK_M": 8}, num_warps=8),
triton.Config({"BLOCK_M": 16}, num_warps=8),
triton.Config({"BLOCK_M": 32}, num_warps=8),
],
key=[
"M",
Expand Down
Loading