Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit c790189

Browse files
authored
Fix torchbench.py --nothing option (#100)
1 parent a2da1ba commit c790189

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchbench.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,8 @@ def main():
907907
output_csv(output_filename, [], [device, name, 0.0])
908908
print_summary(output_filename)
909909
else:
910-
os.path.exists(output_filename) and os.unlink(output_filename)
910+
if output_filename and os.path.exists(output_filename):
911+
os.unlink(output_filename)
911912
for device, name, model, example_inputs in iter_models(args):
912913
torchdynamo.reset()
913914
gc.collect()

0 commit comments

Comments
 (0)