mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
remove dependency to google profiler
This commit is contained in:
@ -61,7 +61,6 @@ cc_binary(
|
||||
"//caffe2/db:db",
|
||||
"//third_party/gflags:gflags",
|
||||
"//third_party/glog:glog",
|
||||
"//third_party/google:profiler",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -5,11 +5,9 @@
|
||||
#include "caffe2/proto/caffe2.pb.h"
|
||||
#include "caffe2/binaries/gflags_namespace.h"
|
||||
#include "glog/logging.h"
|
||||
#include "google/profiler.h"
|
||||
|
||||
DEFINE_string(input_db, "", "The input db.");
|
||||
DEFINE_string(input_db_type, "", "The input db type.");
|
||||
DEFINE_string(profile_file, "db_throughput_profile", "The profile output.");
|
||||
DEFINE_int32(report_interval, 1000, "The report interval.");
|
||||
DEFINE_int32(repeat, 10, "The number to repeat the throughput test.");
|
||||
|
||||
@ -27,7 +25,6 @@ int main(int argc, char** argv) {
|
||||
FLAGS_input_db_type, FLAGS_input_db, caffe2::db::READ));
|
||||
std::unique_ptr<Cursor> cursor(in_db->NewCursor());
|
||||
|
||||
ProfilerStart(FLAGS_profile_file.c_str());
|
||||
for (int iter_id = 0; iter_id < FLAGS_repeat; ++iter_id) {
|
||||
clock_t start = clock();
|
||||
for (int i = 0; i < FLAGS_report_interval; ++i) {
|
||||
@ -44,6 +41,5 @@ int main(int argc, char** argv) {
|
||||
printf("Iteration %03d, took %4.5f seconds, throughput %f items/sec.\n",
|
||||
iter_id, elapsed_seconds, FLAGS_report_interval / elapsed_seconds);
|
||||
}
|
||||
ProfilerStop();
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user