提交 903b2c01 编写于 作者: Q qiaolongfei

optimize code

上级 4c5bcd78
...@@ -6,4 +6,4 @@ add_subdirectory(pybind) ...@@ -6,4 +6,4 @@ add_subdirectory(pybind)
add_subdirectory(string) add_subdirectory(string)
add_subdirectory(recordio) add_subdirectory(recordio)
# NOTE: please add subdirectory inference at last. # NOTE: please add subdirectory inference at last.
add_subdirectory(inference) #add_subdirectory(inference)
...@@ -137,11 +137,7 @@ void OperatorBase::Run(const Scope& scope, const platform::Place& place) { ...@@ -137,11 +137,7 @@ void OperatorBase::Run(const Scope& scope, const platform::Place& place) {
#endif #endif
} }
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
auto* dev_ctx = pool.Get(place); platform::RecordEvent record_event(Type(), pool.Get(place));
// For profiling, don't move out of this function because that will result
// in the failure of multi-GPU profiling.
platform::RecordEvent record_event(Type(), dev_ctx);
RunImpl(scope, place); RunImpl(scope, place);
VLOG(10) << "+ " << DebugStringEx(&scope); VLOG(10) << "+ " << DebugStringEx(&scope);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册