Skip to content

Commit 2332e46

Browse files
wychimeta-codesync[bot]
authored andcommitted
update reproducer template
Summary: This diff contains minor fixes and improvements to the reproducer template system. Reviewed By: FindHao Differential Revision: D85655006 fbshipit-source-id: 6f827073820daf1916bc66a815c7020565f84198
1 parent 3493ac8 commit 2332e46

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tritonparse/reproducer/orchestrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def reproduce(
2323
template: str,
2424
replacer: Optional[PlaceholderReplacer] = None,
2525
kernel_import: KernelImportMode = KernelImportMode.DEFAULT,
26-
) -> dict[str, Path]:
26+
) -> dict[str, str]:
2727
"""
2828
Generate a reproducer script from NDJSON trace file.
2929

tritonparse/reproducer/templates/example.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# {{UTILITY_FUNCTIONS_PLACEHOLDER}}
1515

1616

17-
if __name__ == "__main__":
17+
def launch_kernel():
1818
script_dir = Path(__file__).resolve().parent # noqa: F821
1919
json_file = script_dir / "{{JSON_FILE_NAME_PLACEHOLDER}}"
2020
grid, args_dict = create_args_from_json_file(str(json_file)) # noqa: F821
@@ -28,3 +28,7 @@
2828

2929
torch.cuda.synchronize()
3030
print("Kernel execution finished.")
31+
32+
33+
if __name__ == "__main__":
34+
launch_kernel()

0 commit comments

Comments
 (0)