-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add command line argument parsing for reduction dimensions in Triton …
…sum kernel (#2284) Summary: Pull Request resolved: #2284 Add argument parsing for the command line in order to pass in dimension(s) across which the kernel reduces and enable more rigorous testing of different versions of the sum kernel, referencing [torchbenchmark/operators/fb/flash_attention/operator.py](https://www.internalfb.com/code/fbsource/[864a578ce44afdba619d50a352c8ca3b783e05ef]/fbcode/pytorch/benchmark/torchbenchmark/operators/fb/flash_attention/operator.py?lines=84). Inherit the `__init__` function from the parent class `BenchmarkOperator` in order to facilitate command line argument parsing. Change `dim` type to `list` to avoid type issues resulting from `tl.constexpr`. Modify equality checks in kernel and operator to satisfy type requirements for `dim`. Reviewed By: xuzhao9 Differential Revision: D58212366 fbshipit-source-id: 5c88a7c3e8bf2f37408c6c5e3d302b7e9a473bd4
- Loading branch information
1 parent
2d8999b
commit 9f2ab74
Showing
2 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters