summaryrefslogtreecommitdiff
path: root/binaries
diff options
context:
space:
mode:
authorFei Sun <feisun@fb.com>2018-08-16 10:48:42 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-08-16 10:56:23 -0700
commit319fefe9e6a5fb1d804625c021387e7f980eff38 (patch)
tree01da6fe6538efdd7ad7facb86852f89c9e54443d /binaries
parent00f27311128c7ec7f3c778210816d7677eb22461 (diff)
downloadpytorch-319fefe9e6a5fb1d804625c021387e7f980eff38.tar.gz
pytorch-319fefe9e6a5fb1d804625c021387e7f980eff38.tar.bz2
pytorch-319fefe9e6a5fb1d804625c021387e7f980eff38.zip
Support benchmark on windows machines
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/10564 Reviewed By: llyfacebook Differential Revision: D9356389 Pulled By: sf-wind fbshipit-source-id: f6c58e68d3eaf3a39c9f89b8f04e6039c75b4cd9
Diffstat (limited to 'binaries')
-rw-r--r--binaries/benchmark_helper.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/binaries/benchmark_helper.cc b/binaries/benchmark_helper.cc
index 4c5119f519..7a441dc1c5 100644
--- a/binaries/benchmark_helper.cc
+++ b/binaries/benchmark_helper.cc
@@ -15,6 +15,8 @@
*/
#include <string>
+#include <chrono>
+#include <thread>
#include "binaries/benchmark_helper.h"
#include "caffe2/core/blob_serialization.h"
@@ -241,7 +243,7 @@ void runNetwork(
caffe2::wipe_cache();
}
if (sleep_before_run > 0) {
- sleep(sleep_before_run);
+ std::this_thread::sleep_for(std::chrono::seconds(sleep_before_run));
}
LOG(INFO) << "Main runs.";
CAFFE_ENFORCE(