mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Using c10 namespace across caffe2. (#12714)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12714 This is a short change to enable c10 namespace in caffe2. We did not enable it before due to gflags global variable confusion, but it should have been mostly cleaned now. Right now, the plan on record is that namespace caffe2 and namespace aten will fully be supersets of namespace c10. Most of the diff is codemod, and only two places of non-codemod is in caffe2/core/common.h, where ``` using namespace c10; ``` is added, and in Flags.h, where instead of creating aliasing variables in c10 namespace, we directly put it in the global namespace to match gflags (and same behavior if gflags is not being built with). Reviewed By: dzhulgakov Differential Revision: D10390486 fbshipit-source-id: 5e2df730e28e29a052f513bddc558d9f78a23b9b
This commit is contained in:
committed by
Facebook Github Bot
parent
348867c10b
commit
7d5f7ed270
@ -51,11 +51,11 @@ bool registerGlobalPerfNetObserverCreator(int* /*pargc*/, char*** /*pargv*/) {
|
||||
caffe2::make_unique<caffe2::NetObserverReporterPrint>());
|
||||
|
||||
caffe2::ObserverConfig::initSampleRate(
|
||||
c10::FLAGS_aiBench_netInitSampleRate,
|
||||
c10::FLAGS_aiBench_netFollowupSampleRate,
|
||||
c10::FLAGS_aiBench_netFollowupSampleCount,
|
||||
c10::FLAGS_aiBench_operatorNetSampleRatio,
|
||||
c10::FLAGS_aiBench_skipIters);
|
||||
FLAGS_aiBench_netInitSampleRate,
|
||||
FLAGS_aiBench_netFollowupSampleRate,
|
||||
FLAGS_aiBench_netFollowupSampleCount,
|
||||
FLAGS_aiBench_operatorNetSampleRatio,
|
||||
FLAGS_aiBench_skipIters);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user