summaryrefslogtreecommitdiff
path: root/caffe2/observers
diff options
context:
space:
mode:
authorBram Wasti <bwasti@fb.com>2018-04-24 12:46:48 -0700
committerGitHub <noreply@github.com>2018-04-24 12:46:48 -0700
commitcfb626b6388b2bf77bc017839324a9142e2a6538 (patch)
tree501c6887e7e5b27a85f77efc4411a95b0137f747 /caffe2/observers
parent9dd73aa7ebe4c49d85673833e49545610e162f8b (diff)
downloadpytorch-cfb626b6388b2bf77bc017839324a9142e2a6538.tar.gz
pytorch-cfb626b6388b2bf77bc017839324a9142e2a6538.tar.bz2
pytorch-cfb626b6388b2bf77bc017839324a9142e2a6538.zip
[caffe2][tiny][fix] Make the build work with profile observers (#6908)
Diffstat (limited to 'caffe2/observers')
-rw-r--r--caffe2/observers/profile_observer.h7
-rw-r--r--caffe2/observers/profile_observer_gpu.cc2
2 files changed, 5 insertions, 4 deletions
diff --git a/caffe2/observers/profile_observer.h b/caffe2/observers/profile_observer.h
index 7e66601e0f..ab110da088 100644
--- a/caffe2/observers/profile_observer.h
+++ b/caffe2/observers/profile_observer.h
@@ -66,9 +66,10 @@ class ProfileOperatorObserver : public ProfileCounter,
ProfileObserver* netObserver,
int net_position,
int rnn_order)
- : ProfileOperatorObserver(subject, netObserver),
- net_position_(net_position),
- rnn_order_(rnn_order) {}
+ : ProfileOperatorObserver(subject, netObserver) {
+ net_position_ = net_position;
+ rnn_order_ = rnn_order;
+ }
std::unique_ptr<ObserverBase<OperatorBase>> rnnCopy(
OperatorBase* subject,
diff --git a/caffe2/observers/profile_observer_gpu.cc b/caffe2/observers/profile_observer_gpu.cc
index 579dce3a4c..afeac6d127 100644
--- a/caffe2/observers/profile_observer_gpu.cc
+++ b/caffe2/observers/profile_observer_gpu.cc
@@ -115,7 +115,7 @@ void ProfileOperatorObserver::Stop() {
std::unique_ptr<ObserverBase<OperatorBase>> ProfileOperatorObserver::rnnCopy(
OperatorBase* subject,
- int rnn_order) const override {
+ int rnn_order) const {
return std::unique_ptr<ObserverBase<OperatorBase>>(
new ProfileOperatorObserver(
subject, netObserver_, net_position_, rnn_order));