Fix "hides overloaded virtual function" error in default/gpu_tracer.cc when compiled with -Werror,-Woverloaded-virtual.

PiperOrigin-RevId: 174101519
This commit is contained in:
A. Unique TensorFlower
2017-10-31 15:25:13 -07:00
committed by TensorFlower Gardener
parent b242a7988c
commit d6a9cd40c1
2 changed files with 8 additions and 3 deletions

View File

@@ -319,9 +319,6 @@ class GPUTracerImpl : public GPUTracer,
// We don't do anything with 'TraceMe' regions yet.
return nullptr;
}
Tracer *StartTracing(StringPiece label) {
return StartTracing(label, /*is_expensive=*/true);
}
protected:
// This callback is used exclusively by CUPTIManager.

View File

@@ -174,6 +174,14 @@ class Tracing::Engine {
virtual Tracer* StartTracing(string&& label, bool is_expensive) {
return StartTracing(StringPiece(label), is_expensive);
}
// Backwards compatibility one arg variants (assume is_expensive=true).
Tracer* StartTracing(StringPiece label) {
return StartTracing(label, /*is_expensive=*/true);
}
Tracer* StartTracing(string&& label) {
return StartTracing(StringPiece(label), /*is_expensive=*/true);
}
};
// This class permits a user to apply annotation on kernels and memcpys