Skip to content

Commit

Permalink
Fix tflops counting
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Nov 14, 2024
1 parent 7a2d971 commit 056b832
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tritonbench/operators/ragged_attention/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def tflops(
f1 = 0.0
f2 = 0.0
jagged = True
seq_offsets = example_inputs["seq_offsets"]
q = example_inputs["qkv"][:, :, :128]
v = example_inputs["qkv"][:, :, 256:384]
qkv, seq_offsets, timestamps = example_inputs
q = qkv[:, :, :128]
v = qkv[:, :, 256:384]
_, nheads, attn_dim = q.shape
_, _, hidden_dim = v.shape
max_seqlen = example_inputs["timestamps"].size(1) - 1
max_seqlen = timestamps.size(1) - 1

for i in range(self.batch_size):
seq_len = (
Expand Down

0 comments on commit 056b832

Please sign in to comment.