Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix geneate_dispatch_inc args from parser #870

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions aot_build_utils/generate_dispatch_inc.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def get_dispatch_inc_str(args: argparse.Namespace) -> str:
parser.add_argument(
"--path", type=str, required=True, help="Path to the dispatch inc file"
)
parser.add_argument(
"--head_dims_sm90", type=str, required=True, nargs="+", help="Head dimensions in format of 'head_dim_qk,head_dim_vo'",
)
parser.add_argument(
"--head_dims", type=int, required=True, nargs="+", help="Head dimensions"
)
Expand All @@ -124,6 +127,7 @@ def get_dispatch_inc_str(args: argparse.Namespace) -> str:
help="Mask modes",
)
args = parser.parse_args()
args.head_dims_sm90 = [tuple(map(int, x.split(","))) for x in args.head_dims_sm90]
print(args)
with open(Path(args.path), "w") as f:
f.write(get_dispatch_inc_str(args))