Skip to content

Commit

Permalink
Caffe2 flags needs to be used after the GlobalInit function is called
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#11120

Reviewed By: llyfacebook

Differential Revision: D9598430

Pulled By: sf-wind

fbshipit-source-id: 468f0ed7880339c9c4467d1cef29f5bc9fc80a2a
  • Loading branch information
sf-wind authored and facebook-github-bot committed Aug 31, 2018
1 parent a6cb414 commit 26409a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion binaries/benchmark_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ int benchmark(
bool FLAGS_text_output,
int FLAGS_warmup,
bool FLAGS_wipe_cache) {
caffe2::GlobalInit(&argc, &argv);
// Check arguments to be correct
{
// Need to check whether file exists, as the file reader does not assert if
Expand Down
1 change: 1 addition & 0 deletions binaries/caffe2_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ CAFFE2_DEFINE_bool(
"Whether to evict the cache before running network.");

int main(int argc, char** argv) {
caffe2::GlobalInit(&argc, &argv);
benchmark(
argc,
argv,
Expand Down

0 comments on commit 26409a4

Please sign in to comment.