|
|
|
@ -31,6 +31,10 @@ limitations under the License. */
|
|
|
|
|
namespace paddle {
|
|
|
|
|
namespace operators {
|
|
|
|
|
namespace detail {
|
|
|
|
|
namespace {
|
|
|
|
|
const int kStartProfile = 1;
|
|
|
|
|
const int kStopProfile = 2;
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
using VarMsg = sendrecv::VariableMessage;
|
|
|
|
|
|
|
|
|
@ -124,9 +128,9 @@ void SerializeToByteBuffer(const std::string& name, framework::Variable* var,
|
|
|
|
|
// trainer.
|
|
|
|
|
if (platform::ShouldSendProfileState()) {
|
|
|
|
|
if (platform::IsProfileEnabled()) {
|
|
|
|
|
request.set_profile(1);
|
|
|
|
|
request.set_profile(kStartProfile);
|
|
|
|
|
} else {
|
|
|
|
|
request.set_profile(2);
|
|
|
|
|
request.set_profile(kStopProfile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!out_name.empty()) {
|
|
|
|
|