Skip to content

Commit

Permalink
Implement pairwise to remove python 3.10 restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccorm4 committed Jan 10, 2024
1 parent ab54a41 commit bdb6051
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/triton_cli/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import json
import subprocess
from dataclasses import dataclass
from itertools import pairwise
from itertools import tee
from pathlib import Path
from typing import Optional

Expand Down Expand Up @@ -75,6 +75,14 @@
}


# Built-in to itertools in Python 3.10+
def pairwise(iterable):
# n=2 for pairs
a, b = tee(iterable, 2)
next(b, None)
return zip(a, b)


@dataclass
class ProfileResults:
prompt_size: int
Expand Down

0 comments on commit bdb6051

Please sign in to comment.