Skip to content

Commit d82f0f7

Browse files
Liclaude
andcommitted
fix: use typing.List for Python 3.9 compatibility in benchmark
list[...] as a generic type requires Python 3.10+. Use List from typing to support Python 3.9. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0ceac1e commit d82f0f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

benchmarks/prototype/moe_training/fp8_rowwise/bench_triton_fp8_rowwise_2d_fused_scale_and_cast.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import itertools
99
from dataclasses import dataclass
10+
from typing import List
1011

1112
import torch
1213
from tabulate import tabulate
@@ -45,7 +46,7 @@ class Experiment:
4546
result: ExperimentResult
4647

4748

48-
def get_configs() -> list[ExperimentConfig]:
49+
def get_configs() -> List[ExperimentConfig]:
4950
# MoE-relevant 2D shapes: (M, K) where M = total tokens routed to experts.
5051
# In practice M depends on batch_size * seq_len * top_k / num_experts.
5152
# K is model hidden dim or intermediate dim.
@@ -147,7 +148,7 @@ def run_fused(A: torch.Tensor):
147148
)
148149

149150

150-
def print_results(experiments: list[Experiment]):
151+
def print_results(experiments: List[Experiment]):
151152
headers = [
152153
"shape (M, K)",
153154
"dtype",

0 commit comments

Comments
 (0)