Skip to content

Commit 3bbee51

Browse files
committed
fix: remove accuracy prefix from tests, fix __all__ sort order for feature_dropout
1 parent 91fede8 commit 3bbee51

3 files changed

Lines changed: 52 additions & 7 deletions

File tree

PR_status.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Feb 27 KernelGen PR Status
2+
3+
## ✅ 可以 Approve Merge
4+
5+
| # | PR | 算子 | CI 状态 | 加速比 | Benchmark | 备注 |
6+
|---|-----|------|---------|--------|-----------|------|
7+
| 2 | [#1749](https://github.com/flagos-ai/FlagGems/pull/1749) | logsumexp | ✅ GREEN | **2.5-6.7x** | ✅ 已贴 | PR有问题:大量删除已注册算子 |
8+
| 3 | [#1757](https://github.com/flagos-ai/FlagGems/pull/1757) | poisson | ✅ GREEN | 未测 || 没有 rebase 到 master |
9+
| 4 | [#1725](https://github.com/flagos-ai/FlagGems/pull/1725) | concatenate | ⏳ CLA | **1.1-1.4x** | ✅ 已贴 | __init__.py 合并冲突及小改动意见 |
10+
| 5 | [#1729](https://github.com/flagos-ai/FlagGems/pull/1729) | cudnn_convolution | ⏳ CLA | 未测 | ✅ 已加 | ✅ Approved |
11+
| 6 | [#1731](https://github.com/flagos-ai/FlagGems/pull/1731) | einsum | ⏳ CLA | ~0.7-0.9x | ✅ 已贴 | 已review,有疑问待回复 |
12+
| 7 | [#1732](https://github.com/flagos-ai/FlagGems/pull/1732) | feature_dropout | ⏳ CLA | 0.3-0.8x | ✅ 已贴 | 已review,有疑问待回复 |
13+
| 8 | [#1737](https://github.com/flagos-ai/FlagGems/pull/1737) | fmod | ⏳ CLA | ~1.0x | ✅ 已贴 | benchmark不全,算子名称有问题 |
14+
| 9 | [#1743](https://github.com/flagos-ai/FlagGems/pull/1743) | index_copy_ | ⏳ CLA | 小tensor差, 大tensor~1.0x | ✅ 已贴 | 已review,小问题待修 |
15+
| 10 | [#1755](https://github.com/flagos-ai/FlagGems/pull/1755) | nonzero_numpy | ⏳ CLA | 0.2-0.9x | 已跑未贴 | ✅ Approved |
16+
| 11 | [#1761](https://github.com/flagos-ai/FlagGems/pull/1761) | rsub | ⏳ CLA | 未测 | ✅ 已加 | 有冲突待解决,有小修改建议 |
17+
| 12 | [#1762](https://github.com/flagos-ai/FlagGems/pull/1762) | scatter_reduce_ | ⏳ CLA | 未测 | ✅ 已加 | 须细查现成实现,reduce支持多种方式 |
18+
| 13 | [#1722](https://github.com/flagos-ai/FlagGems/pull/1722) | bincount | ⚠️ python-op | 未测 || 需更细粒度精度/性能比较 |
19+
20+
## ⚠️ 重复算子(upstream已有实现,需更细粒度比较)
21+
22+
| # | PR | 算子 | CI 状态 | 备注 |
23+
|---|-----|------|---------|------|
24+
| 1 | [#1738](https://github.com/flagos-ai/FlagGems/pull/1738) | greater | ✅ GREEN | upstream已有,需更细粒度精度/性能比较 |
25+
| 2 | [#1745](https://github.com/flagos-ai/FlagGems/pull/1745) | isneginf | ✅ GREEN | upstream已有,需更细粒度精度/性能比较 |
26+
| 3 | [#1753](https://github.com/flagos-ai/FlagGems/pull/1753) | new_full | ✅ GREEN | upstream已有,需更细粒度精度/性能比较 |
27+
| 4 | [#1754](https://github.com/flagos-ai/FlagGems/pull/1754) | nll_loss_nd | ✅ GREEN | upstream已有,需更细粒度精度/性能比较 |
28+
| 5 | [#1763](https://github.com/flagos-ai/FlagGems/pull/1763) | signbit | ✅ GREEN | upstream已有,需更细粒度精度/性能比较 |
29+
30+
## ❌ 有问题,不应 Merge
31+
32+
| # | PR | 算子 | 问题 |
33+
|---|-----|------|------|
34+
| 1 | [#1695](https://github.com/flagos-ai/FlagGems/pull/1695) | __rshift__ | 等待unittest |
35+
| 2 | [#1698](https://github.com/flagos-ai/FlagGems/pull/1698) | _convolution | hack无jit kernel |
36+
| 3 | [#1709](https://github.com/flagos-ai/FlagGems/pull/1709) | _scaled_dot_product_attention_math | hack无jit kernel |
37+
| 4 | [#1719](https://github.com/flagos-ai/FlagGems/pull/1719) | aminmax | upstream已有,跳过 |
38+
| 5 | [#1720](https://github.com/flagos-ai/FlagGems/pull/1720) | argsort | 加速比极低(0.02x) |
39+
| 6 | [#1724](https://github.com/flagos-ai/FlagGems/pull/1724) | col2im | test_pad upstream bug |
40+
| 7 | [#1726](https://github.com/flagos-ai/FlagGems/pull/1726) | conv_transpose1d | kernel本身有bug |
41+
| 8 | [#1730](https://github.com/flagos-ai/FlagGems/pull/1730) | diff | pad报错,1D极差 |
42+
| 9 | [#1736](https://github.com/flagos-ai/FlagGems/pull/1736) | floor | upstream已有floor_ |
43+
| 10 | [#1742](https://github.com/flagos-ai/FlagGems/pull/1742) | histc | 未测 |
44+
| 11 | [#1747](https://github.com/flagos-ai/FlagGems/pull/1747) | log1p | upstream已有log1p_ |
45+
| 12 | [#1748](https://github.com/flagos-ai/FlagGems/pull/1748) | log_normal_ | 无jit kernel,非fused实现 |

src/flag_gems/ops/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,10 @@
460460
"expm1_",
461461
"expm1_out",
462462
"exponential_",
463-
"feature_dropout",
464-
"feature_dropout_",
465463
"eye",
466464
"eye_m",
465+
"feature_dropout",
466+
"feature_dropout_",
467467
"fill_scalar",
468468
"fill_scalar_",
469469
"fill_scalar_out",

tests/test_feature_dropout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@pytest.mark.parametrize("shape", FEATURE_DROPOUT_SHAPES)
1818
@pytest.mark.parametrize("p", [0.3, 0.5, 0.7])
1919
@pytest.mark.parametrize("dtype", FLOAT_DTYPES)
20-
def test_accuracy_feature_dropout(shape, p, dtype):
20+
def test_feature_dropout(shape, p, dtype):
2121
inp = torch.randn(shape, dtype=dtype, device=flag_gems.device)
2222
with flag_gems.use_gems():
2323
res_out = torch.feature_dropout(inp, p, True)
@@ -49,7 +49,7 @@ def test_accuracy_feature_dropout(shape, p, dtype):
4949
@pytest.mark.feature_dropout
5050
@pytest.mark.parametrize("shape", FEATURE_DROPOUT_SHAPES)
5151
@pytest.mark.parametrize("dtype", FLOAT_DTYPES)
52-
def test_accuracy_feature_dropout_no_train(shape, dtype):
52+
def test_feature_dropout_no_train(shape, dtype):
5353
inp = torch.randn(shape, dtype=dtype, device=flag_gems.device)
5454
with flag_gems.use_gems():
5555
res_out = torch.feature_dropout(inp, 0.5, False)
@@ -59,7 +59,7 @@ def test_accuracy_feature_dropout_no_train(shape, dtype):
5959
@pytest.mark.feature_dropout
6060
@pytest.mark.parametrize("shape", FEATURE_DROPOUT_SHAPES)
6161
@pytest.mark.parametrize("dtype", FLOAT_DTYPES)
62-
def test_accuracy_feature_dropout_p_zero(shape, dtype):
62+
def test_feature_dropout_p_zero(shape, dtype):
6363
inp = torch.randn(shape, dtype=dtype, device=flag_gems.device)
6464
with flag_gems.use_gems():
6565
res_out = torch.feature_dropout(inp, 0.0, True)
@@ -69,7 +69,7 @@ def test_accuracy_feature_dropout_p_zero(shape, dtype):
6969
@pytest.mark.feature_dropout
7070
@pytest.mark.parametrize("shape", FEATURE_DROPOUT_SHAPES)
7171
@pytest.mark.parametrize("dtype", FLOAT_DTYPES)
72-
def test_accuracy_feature_dropout_p_one(shape, dtype):
72+
def test_feature_dropout_p_one(shape, dtype):
7373
inp = torch.randn(shape, dtype=dtype, device=flag_gems.device)
7474
with flag_gems.use_gems():
7575
res_out = torch.feature_dropout(inp, 1.0, True)
@@ -80,7 +80,7 @@ def test_accuracy_feature_dropout_p_one(shape, dtype):
8080
@pytest.mark.parametrize("shape", FEATURE_DROPOUT_SHAPES)
8181
@pytest.mark.parametrize("p", [0.3, 0.5])
8282
@pytest.mark.parametrize("dtype", FLOAT_DTYPES)
83-
def test_accuracy_feature_dropout_inplace(shape, p, dtype):
83+
def test_feature_dropout_inplace(shape, p, dtype):
8484
inp = torch.randn(shape, dtype=dtype, device=flag_gems.device)
8585
inp_clone = inp.clone()
8686
with flag_gems.use_gems():

0 commit comments

Comments
 (0)