Skip to content

Commit 4fb7cc7

Browse files
authored
Move sync_mode device ctx from grpc server (#10881)
1 parent 5870a6b commit 4fb7cc7

28 files changed

+886
-553
lines changed

benchmark/fluid/kube_gen_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def parse_args():
4949
parser.add_argument(
5050
'--fluid', default=1, type=int, help='whether is fluid job')
5151
parser.add_argument(
52-
'--rdma', action='store_ture', help='whether mount rdma libs')
52+
'--rdma', action='store_true', help='whether mount rdma libs')
5353
parser.add_argument(
5454
'--disttype',
5555
default="pserver",

paddle/fluid/inference/analysis/data_flow_graph.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ limitations under the License. */
2121

2222
#include <deque>
2323
#include <stack>
24+
#include <string>
2425
#include <unordered_set>
26+
#include <utility>
27+
#include <vector>
2528

2629
#include "paddle/fluid/inference/analysis/graph_traits.h"
2730
#include "paddle/fluid/inference/analysis/node.h"

paddle/fluid/inference/analysis/data_flow_graph_to_fluid_pass_tester.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ TEST_F(DFG_Tester, Test) {
4444
LOG(INFO) << graph.nodes.size();
4545
}
4646

47-
} // analysis
48-
} // inference
49-
} // paddle
47+
}; // namespace analysis
48+
}; // namespace inference
49+
}; // namespace paddle

paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.h"
15+
#include <string>
1616
#include <vector>
1717

18+
#include "paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.h"
19+
1820
namespace paddle {
1921
namespace inference {
2022
namespace analysis {

paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#pragma once
2121

22+
#include <string>
23+
2224
#include "paddle/fluid/framework/program_desc.h"
2325
#include "paddle/fluid/inference/analysis/data_flow_graph.h"
2426
#include "paddle/fluid/inference/analysis/pass.h"

paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass_tester.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ TEST_F(DFG_Tester, Init) {
3232
LOG(INFO) << '\n' << graph.DotString();
3333
}
3434

35-
} // analysis
36-
} // inference
37-
} // paddle
35+
} // namespace analysis
36+
} // namespace inference
37+
} // namespace paddle

paddle/fluid/inference/analysis/helper.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct DataTypeNamer {
5050
return dic_.at(x);
5151
}
5252

53-
const std::string &repr(size_t &hash) const {
53+
const std::string &repr(size_t &hash) const { // NOLINT
5454
PADDLE_ENFORCE(dic_.count(hash), "unknown type for representation");
5555
return dic_.at(hash);
5656
}
@@ -62,7 +62,9 @@ struct DataTypeNamer {
6262
SET_TYPE(float);
6363
}
6464

65-
std::unordered_map<decltype(typeid(int).hash_code()), std::string> dic_;
65+
std::unordered_map<decltype(typeid(int).hash_code()), // NOLINT
66+
std::string>
67+
dic_;
6668
};
6769
#undef SET_TYPE
6870

paddle/fluid/inference/analysis/pass.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License. */
1616

1717
#include <glog/logging.h>
1818
#include <iosfwd>
19+
#include <string>
1920

2021
#include "paddle/fluid/framework/framework.pb.h"
2122
#include "paddle/fluid/inference/analysis/data_flow_graph.h"

paddle/fluid/inference/analysis/subgraph_splitter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ limitations under the License. */
1818

1919
#pragma once
2020

21+
#include <vector>
22+
2123
#include "paddle/fluid/inference/analysis/data_flow_graph.h"
2224
#include "paddle/fluid/inference/analysis/node.h"
2325

paddle/fluid/inference/analysis/ut_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License. */
1515
#pragma once
1616
#include <gflags/gflags.h>
1717
#include <gtest/gtest.h>
18+
#include <string>
1819
#include "paddle/fluid/framework/executor.h"
1920
#include "paddle/fluid/inference/analysis/data_flow_graph.h"
2021
#include "paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.h"

0 commit comments

Comments
 (0)