Skip to content

Commit

Permalink
Fix hardcoded shape in low_mem_dropout benchmark (#2475)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #2475

Reviewed By: htyu

Differential Revision: D63653081

Pulled By: xuzhao9

fbshipit-source-id: 8d840986779b6124cbccc2425c24e2b892d55ce4
  • Loading branch information
mark14wu authored and facebook-github-bot committed Oct 1, 2024
1 parent 611bf70 commit 252a3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchbenchmark/operators/low_mem_dropout/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def triton_dropout(self, p, x):
n_elements = x.numel()
grid = lambda meta: (triton.cdiv(n_elements, meta["BLOCK_SIZE"]),)

x_keep = (torch.rand(size=(10,)) > p).to(torch.int32).cuda()
x_keep = (torch.rand(size=(n_elements,)) > p).to(torch.int32).cuda()

def _inner():
return _triton_dropout[grid](
Expand Down

0 comments on commit 252a3b1

Please sign in to comment.