Skip to content

Commit 69e71d9

Browse files
authored
Update benchmarking tool to run on local iPhones
Differential Revision: D80095129 Pull Request resolved: #2775
1 parent 9e3758d commit 69e71d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

torchao/experimental/benchmark_infra/ios/output_redirect.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
close(stdout_dupfd_);
4141
close(stderr_dupfd_);
4242
fclose(redirect_out_);
43+
/* write done file to detect end of benchmark*/
44+
std::string file_name =
45+
std::string(std::getenv("HOME")) + "/tmp/BENCH_DONE";
46+
FILE *donefile = fopen(file_name.c_str(), "w");
47+
std::string done_str = "DONE BENCHMARKING";
48+
fwrite(done_str.c_str(), 1, done_str.size(), donefile);
49+
fclose(donefile);
4350
}
4451
}
4552

0 commit comments

Comments
 (0)