Skip to content

Commit

Permalink
Update the benchmark input dimensions to vary based on batch size ins…
Browse files Browse the repository at this point in the history
…tead of height and width
  • Loading branch information
voltjia committed Jan 11, 2025
1 parent 7951329 commit e2e0112
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def grid(meta):

@triton.testing.perf_report(
triton.testing.Benchmark(
x_names=["h", "w"],
x_vals=[8 * i for i in range(2, 33)],
x_names=["n"],
x_vals=[2**i for i in range(11)],
line_arg="provider",
line_vals=["ninetoothed", "torch", "triton"],
line_names=["NineToothed", "PyTorch", "Triton"],
Expand All @@ -226,9 +226,9 @@ def grid(meta):
args={},
)
)
def benchmark(h, w, provider):
n, c, _, _ = 64, 3, h, w
k, _, r, s = 64, c, 3, 3
def benchmark(n, provider):
_, c, h, w = n, 512, 14, 14
k, _, r, s = 512, c, 3, 3
dtype = torch.float16
input = torch.randn((n, c, h, w), dtype=dtype, device="cuda")
filter = torch.randn((k, c, r, s), dtype=dtype, device="cuda")
Expand Down

0 comments on commit e2e0112

Please sign in to comment.