mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
move flags to c10 (#12144)
Summary: still influx. Pull Request resolved: https://github.com/pytorch/pytorch/pull/12144 Reviewed By: smessmer Differential Revision: D10140176 Pulled By: Yangqing fbshipit-source-id: 1a313abed022039333e3925d19f8b3ef2d95306c
This commit is contained in:
committed by
Facebook Github Bot
parent
c9f7d7b506
commit
38f3d1fc40
@ -11,27 +11,27 @@
|
||||
#include "caffe2/core/operator.h"
|
||||
|
||||
#if !CAFFE2_MOBILE
|
||||
CAFFE2_DEFINE_int64(
|
||||
C10_DEFINE_int64(
|
||||
aiBench_netInitSampleRate,
|
||||
0,
|
||||
"One in N sampling rate for net delay");
|
||||
|
||||
CAFFE2_DEFINE_int64(
|
||||
C10_DEFINE_int64(
|
||||
aiBench_netFollowupSampleRate,
|
||||
0,
|
||||
"One in N sampling rate for net delay");
|
||||
|
||||
CAFFE2_DEFINE_int64(
|
||||
C10_DEFINE_int64(
|
||||
aiBench_netFollowupSampleCount,
|
||||
0,
|
||||
"control the following c logs");
|
||||
|
||||
CAFFE2_DEFINE_int64(
|
||||
C10_DEFINE_int64(
|
||||
aiBench_operatorNetSampleRatio,
|
||||
0,
|
||||
"One in N sampling rate for operator delay");
|
||||
|
||||
CAFFE2_DEFINE_int64(
|
||||
C10_DEFINE_int64(
|
||||
aiBench_skipIters,
|
||||
0,
|
||||
"skip the first N iterations of the net run");
|
||||
@ -51,11 +51,11 @@ bool registerGlobalPerfNetObserverCreator(int* /*pargc*/, char*** /*pargv*/) {
|
||||
caffe2::make_unique<caffe2::NetObserverReporterPrint>());
|
||||
|
||||
caffe2::ObserverConfig::initSampleRate(
|
||||
FLAGS_aiBench_netInitSampleRate,
|
||||
FLAGS_aiBench_netFollowupSampleRate,
|
||||
FLAGS_aiBench_netFollowupSampleCount,
|
||||
FLAGS_aiBench_operatorNetSampleRatio,
|
||||
FLAGS_aiBench_skipIters);
|
||||
c10::FLAGS_aiBench_netInitSampleRate,
|
||||
c10::FLAGS_aiBench_netFollowupSampleRate,
|
||||
c10::FLAGS_aiBench_netFollowupSampleCount,
|
||||
c10::FLAGS_aiBench_operatorNetSampleRatio,
|
||||
c10::FLAGS_aiBench_skipIters);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
@ -21,8 +21,10 @@
|
||||
#include "rocksdb/db.h"
|
||||
#include "rocksdb/utilities/leveldb_options.h"
|
||||
|
||||
CAFFE2_DEFINE_int(caffe2_rocksdb_block_size, 65536,
|
||||
"The caffe2 rocksdb block size when writing a rocksdb.");
|
||||
C10_DEFINE_int(
|
||||
caffe2_rocksdb_block_size,
|
||||
65536,
|
||||
"The caffe2 rocksdb block size when writing a rocksdb.");
|
||||
|
||||
namespace caffe2 {
|
||||
namespace db {
|
||||
@ -74,7 +76,7 @@ class RocksDB : public DB {
|
||||
public:
|
||||
RocksDB(const string& source, Mode mode) : DB(source, mode) {
|
||||
rocksdb::LevelDBOptions options;
|
||||
options.block_size = FLAGS_caffe2_rocksdb_block_size;
|
||||
options.block_size = c10::FLAGS_caffe2_rocksdb_block_size;
|
||||
options.write_buffer_size = 268435456;
|
||||
options.max_open_files = 100;
|
||||
options.error_if_exists = mode == NEW;
|
||||
|
Reference in New Issue
Block a user