mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
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
This commit is contained in:
parent
00f2731112
commit
319fefe9e6
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ if NOT DEFINED USE_CUDA (
|
|||
set USE_CUDA=OFF
|
||||
)
|
||||
|
||||
if NOT DEFINED USE_OBSERVERS (
|
||||
set USE_OBSERVERS=OFF
|
||||
)
|
||||
|
||||
if NOT DEFINED CMAKE_GENERATOR (
|
||||
if DEFINED APPVEYOR_BUILD_WORKER_IMAGE (
|
||||
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (
|
||||
|
|
@ -61,6 +65,7 @@ cmake .. ^
|
|||
-DUSE_GFLAGS=OFF ^
|
||||
-DUSE_LMDB=OFF ^
|
||||
-DUSE_LEVELDB=OFF ^
|
||||
-DUSE_OBSERVERS=%USE_OBSERVERS%^
|
||||
-DUSE_ROCKSDB=OFF ^
|
||||
-DUSE_OPENCV=OFF ^
|
||||
-DBUILD_SHARED_LIBS=OFF ^
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user