Skip to content

Commit 69ba646

Browse files
committed
fix ufmt
1 parent 5659391 commit 69ba646

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

benchmarks/tagging/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ def merge_decorator_tags(op_name, backend_name, tags_dict):
133133

134134
# Get decorator tags if they exist
135135
backend_config = REGISTERED_BENCHMARKS.get(op_name, {}).get(backend_name)
136-
decorator_tags = backend_config.tags if (backend_config and backend_config.tags) else []
136+
decorator_tags = (
137+
backend_config.tags if (backend_config and backend_config.tags) else []
138+
)
137139
if decorator_tags:
138140
# Merge decorator tags with auto-detected tags (remove duplicates)
139141
all_tags = list(set(decorator_tags + tags_dict["tags"]))

benchmarks/tritonparse_sweep/run.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def setup_tritonbench_cwd():
4141
setup_tritonbench_cwd()
4242

4343
import tritonparse
44-
from tritonparse.reproducer.orchestrator import reproduce as tritonparse_reproduce
45-
from tritonparse.reproducer.types import KernelImportMode
4644
from tritonbench.operators_collection import list_operators_by_collection
4745
from tritonbench.utils.run_utils import run_in_task, setup_output_dir
46+
from tritonparse.reproducer.orchestrator import reproduce as tritonparse_reproduce
47+
from tritonparse.reproducer.types import KernelImportMode
4848

4949
NOT_WORKING_OPS = ["tritonparse_softmax_triton_softmax"]
5050

@@ -93,12 +93,12 @@ def find_ndjson_files(log_dir):
9393

9494

9595
def find_reproducer_script(output: str):
96-
output_line: list[str] = [ x for x in output.splitlines() if "repro_script" in x ]
96+
output_line: list[str] = [x for x in output.splitlines() if "repro_script" in x]
9797
if len(output_line) == 0:
9898
return None
99-
output_line = output_line[0][output_line[0].find("{"):].strip()
99+
output_line = output_line[0][output_line[0].find("{") :].strip()
100100
output_dict = eval(output_line)
101-
return output_dict['repro_script']
101+
return output_dict["repro_script"]
102102

103103

104104
def run_repro_script(repro_script):

tritonbench/operators/launch_latency/cutedsl.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import cutlass
22
import cutlass.cute as cute
33

4+
45
@cute.kernel
56
def nop_kernel():
67
pass
78

9+
810
@cute.jit
911
def cutedsl_nop_kernel():
1012
nop_kernel()
1113

14+
1215
@cute.kernel
1316
def nop_with_args_kernel(
1417
t1: cute.Tensor,
@@ -33,6 +36,7 @@ def nop_with_args_kernel(
3336
):
3437
pass
3538

39+
3640
@cute.jit
3741
def cutedsl_nop_with_args_kernel(
3842
t1: cute.Tensor,
@@ -53,5 +57,8 @@ def cutedsl_nop_with_args_kernel(
5357
c2: cutlass.Constexpr,
5458
c3: cutlass.Constexpr,
5559
c4: cutlass.Constexpr,
56-
c5: cutlass.Constexpr,):
57-
nop_with_args_kernel(t1, t2, t3, t4, t5, i1, i2, i3, i4, i5, i6, i7, i8, i9, c1, c2, c3, c4, c5)
60+
c5: cutlass.Constexpr,
61+
):
62+
nop_with_args_kernel(
63+
t1, t2, t3, t4, t5, i1, i2, i3, i4, i5, i6, i7, i8, i9, c1, c2, c3, c4, c5
64+
)

tritonbench/operators/launch_latency/operator.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33

44
from torch._inductor.utils import triton_version_uses_attrs_dict
55
from triton.compiler import CompiledKernel
6-
7-
from tritonbench.utils.triton_op import (
8-
BenchmarkOperator,
9-
register_benchmark,
10-
)
116
from tritonbench.utils.python_utils import try_import
127

8+
from tritonbench.utils.triton_op import BenchmarkOperator, register_benchmark
9+
1310
with try_import("HAS_TILELANG"):
1411
import tilelang
12+
1513
from .tilelang import tilelang_nop_kernel, tilelang_nop_with_args_kernel
1614

1715
with try_import("HAS_CUTEDSL"):
1816
import cutlass.cute as cute
17+
1918
from .cutedsl import cutedsl_nop_kernel, cutedsl_nop_with_args_kernel
2019

2120
from .kernels import get_trivial_add_kernel, nop_kernel, nop_with_args_kernel
@@ -105,7 +104,9 @@ def nop_cutedsl_tvm_ffi(self, *args):
105104
cute_args.append(cute.runtime.from_dlpack(arg, enable_tvm_ffi=True))
106105
else:
107106
cute_args.append(arg)
108-
kernel = cute.compile(cutedsl_nop_with_args_kernel, *cute_args, options="--enable-tvm-ffi")
107+
kernel = cute.compile(
108+
cutedsl_nop_with_args_kernel, *cute_args, options="--enable-tvm-ffi"
109+
)
109110
# remove constexpr args
110111
cute_args = cute_args[:-5]
111112
return lambda: kernel(*cute_args)

tritonbench/operators/launch_latency/tilelang.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import tilelang
22
import tilelang.language as T
33

4+
45
@tilelang.jit()
56
def tilelang_nop_kernel():
6-
77
@T.prim_func
88
def nop_kernel():
99
with T.Kernel(1) as bx:
1010
pass
11+
1112
return nop_kernel
1213

1314

@@ -37,4 +38,5 @@ def nop_with_args_kernel(
3738
):
3839
with T.Kernel(1) as bx:
3940
pass
41+
4042
return nop_with_args_kernel

0 commit comments

Comments
 (0)