Skip to content

Commit

Permalink
Fix a metrics reporting issue for FP8 row-wise
Browse files Browse the repository at this point in the history
Summary: It seems that ` metrics.latency` and ` metrics.tflops` are not lists but a scalar.

Reviewed By: xuzhao9

Differential Revision: D58599542

fbshipit-source-id: d4dbfb01f20e44355b01f0f6bebe7dca86c3615e
  • Loading branch information
htyu authored and facebook-github-bot committed Jun 14, 2024
1 parent 95b4202 commit 10e4bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchbenchmark/operators/fp8_gemm_rowwise/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def tflops(
m, k = xq.size()
n, k = wq.size()
flops = m * k * 2 * n
return [flops / x / 1e12 * 1e3 for x in metrics.latency]
return flops / metrics.latency / 1e12 * 1e3

@register_x_val(label="(M, N, K)")
def get_x_val(self, example_inputs) -> Tuple[int, int, int]:
Expand Down

0 comments on commit 10e4bc4

Please sign in to comment.