There was an error while loading. Please reload this page.
2 parents 04e5a42 + 4bcaa80 commit df4c0ccCopy full SHA for df4c0cc
24 files changed
.github/CODEOWNERS
@@ -0,0 +1,16 @@
1
+# These owners will be the default owners for everything in
2
+# the repo. Unless a later match takes precedence,
3
+# @global-owner1 and @global-owner2 will be requested for
4
+# review when someone opens a pull request.
5
+
6
+/src/flag_gems/* @kiddyjinjin @0x45f
7
+/src/flag_gems/runtime/backend/*
8
9
+/tests/* @kiddyjinjin @0x45f
10
+/modules_tests/* @kiddyjinjin @0x45f
11
+/benchmark/* @kiddyjinjin @0x45f
12
13
14
+/lib/* @zhangpeiyang1 @huangyiqun
15
+/ctests/* @zhangpeiyang1 @huangyiqun
16
+/include/* @zhangpeiyang1 @huangyiqun
.github/workflows/code_scan.yaml
@@ -9,6 +9,7 @@ on:
jobs:
scan-code-and-report:
runs-on: scan
+ if: ${{ github.repository == 'Flagopen/FlagGems' }}
concurrency:
group: scan-code-and-report-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
.github/workflows/gems-test-on-hopper.yaml
@@ -87,6 +87,14 @@ jobs:
87
run_command pytest -s tests/test_special_ops.py && \
88
run_command pytest -s tests/test_distribution_ops.py
89
90
+ - name: FlagGems convolution ops on hopper
91
+ shell: bash
92
+ run: |
93
+ source "/home/zhangzhihui/miniconda3/etc/profile.d/conda.sh"
94
+ conda activate flag_gems
95
+ source tools/run_command.sh
96
+ run_command pytest -s tests/test_convolution_ops.py
97
98
- name: FlagGems utils on hopper
99
shell: bash
100
run: |
benchmark/performance_utils.py
@@ -262,12 +262,7 @@ def set_gems(self, gems_op):
262
self.gems_op = gems_op
263
264
def get_latency(self, op, *args, **kwargs):
265
- if self.is_inplace:
266
- fn = lambda: op(
267
- *[x.clone() if torch.is_tensor(x) else x for x in args], **kwargs
268
- )
269
- else:
270
- fn = lambda: op(*args, **kwargs)
+ fn = lambda: op(*args, **kwargs)
271
if self.is_backward:
272
out = fn()
273
dout = torch.randn_like(out)
benchmark/test_convolution_perf.py
@@ -14,6 +14,10 @@ def set_more_shapes(self):
(16, 24, 2048, 96, 7, 1, 3, 2),
(8, 8, 8192, 16, 11, 4, 5, 1),
(4, 4, 16384, 4, 15, 2, 7, 1),
17
+ (32, 64, 512, 64, 3, 1, "valid", 1),
18
+ (64, 48, 1024, 128, 5, 2, "valid", 1),
19
+ (16, 24, 2048, 96, 7, 1, "same", 2),
20
+ (8, 8, 8192, 16, 11, 1, "same", 1),
21
]
22
23
@@ -63,6 +67,10 @@ def set_more_shapes(self):
63
67
(16, 32, 12, 12, 24, 3, 3, 2, 1, 1),
64
68
(16, 32, 24, 24, 24, 3, 3, 2, 2, 2),
65
69
(16, 32, 24, 24, 24, 3, 3, 1, 2, 2),
70
+ (16, 32, 12, 12, 24, 3, 3, 2, "valid", 1),
71
+ (32, 64, 128, 128, 32, 3, 3, 1, "valid", 1),
72
+ (16, 32, 24, 24, 24, 3, 3, 1, "same", 2),
73
+ (32, 64, 210, 210, 16, 5, 5, 1, "same", 1),
66
74
75
76
benchmark/test_unary_pointwise_perf.py
@@ -13,6 +13,7 @@
)
from benchmark.performance_utils import Benchmark, SkipVersion, generate_tensor_input
+vendor_name = flag_gems.vendor_name
fp64_is_supported = flag_gems.runtime.device.support_fp64
@@ -90,10 +91,11 @@ def get_tflops(self, op, *args, **kwargs):
],
def test_general_unary_pointwise_perf(op_name, torch_op, dtypes):
- if op_name in ["celu"] and SkipVersion("torch", "<2.5"):
- pytest.skip(
- "There is an error in kunlunxin torch 2.0 aten, please use torch 2.5 instead"
+ if vendor_name == "kunlunxin":
+ if op_name in ["celu"] and SkipVersion("torch", "<2.5"):
+ pytest.skip(
+ "There is an error in kunlunxin torch 2.0 aten, please use torch 2.5 instead"
+ )
bench = UnaryPointwiseBenchmark(op_name=op_name, torch_op=torch_op, dtypes=dtypes)
bench.run()
101
@@ -139,10 +141,11 @@ def test_general_unary_pointwise_perf(op_name, torch_op, dtypes):
139
141
140
142
143
def test_general_inplace_unary_pointwise_perf(op_name, torch_op, dtypes):
- if op_name in ["celu_"] and SkipVersion("torch", "<2.5"):
144
145
+ if op_name in ["celu_"] and SkipVersion("torch", "<2.5"):
146
147
148
149
bench = UnaryPointwiseBenchmark(
150
op_name=op_name, torch_op=torch_op, dtypes=dtypes, is_inplace=True
151
0 commit comments