Skip to content

Commit 903b2c0

Browse files
committed
optimize code
1 parent 4c5bcd7 commit 903b2c0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

paddle/fluid/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ add_subdirectory(pybind)
66
add_subdirectory(string)
77
add_subdirectory(recordio)
88
# NOTE: please add subdirectory inference at last.
9-
add_subdirectory(inference)
9+
#add_subdirectory(inference)

paddle/fluid/framework/operator.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ void OperatorBase::Run(const Scope& scope, const platform::Place& place) {
137137
#endif
138138
}
139139
platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance();
140-
auto* dev_ctx = pool.Get(place);
141-
142-
// For profiling, don't move out of this function because that will result
143-
// in the failure of multi-GPU profiling.
144-
platform::RecordEvent record_event(Type(), dev_ctx);
140+
platform::RecordEvent record_event(Type(), pool.Get(place));
145141
RunImpl(scope, place);
146142
VLOG(10) << "+ " << DebugStringEx(&scope);
147143
}

0 commit comments

Comments
 (0)