File tree Expand file tree Collapse file tree 5 files changed +7
-4
lines changed Expand file tree Collapse file tree 5 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ std::unique_ptr<Graph> MultiDevSSAGraphBuilder::Apply(
333
333
* Only variables should be the leaves of graph.
334
334
*/
335
335
AddOutputToLeafOps (&result);
336
- return std::move ( graph) ;
336
+ return graph;
337
337
}
338
338
339
339
bool MultiDevSSAGraphBuilder::IsSparseGradient (const std::string &og) const {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class SSAGraghBuilderWithChecker : public SSAGraphBuilder {
31
31
std::unique_ptr<Graph> Apply (std::unique_ptr<Graph> graph) const override {
32
32
auto new_graph = builder_->Apply (std::move (graph));
33
33
PADDLE_ENFORCE (IsValidGraph (new_graph.get ()));
34
- return std::move ( new_graph) ;
34
+ return new_graph;
35
35
}
36
36
37
37
int GetVarDeviceID (const std::string& var_name) const override {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class SSAGraghBuilderWithPrinter : public SSAGraphBuilder {
53
53
std::unique_ptr<Graph> Apply (std::unique_ptr<Graph> graph) const override {
54
54
auto new_graph = builder_->Apply (std::move (graph));
55
55
printer_->Print (*new_graph, stream_ref_);
56
- return std::move ( new_graph) ;
56
+ return new_graph;
57
57
}
58
58
59
59
int GetVarDeviceID (const std::string& var_name) const override {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace framework {
21
21
22
22
// NOTE(paddle-dev): This graph contains circle.
23
23
Graph::Graph (const ProgramDesc &program) : program_(program) {
24
+ VLOG (3 ) << " block in program:" << program_.Size ();
24
25
std::unordered_map<std::string, VarDesc *> all_vars;
25
26
for (auto *var : program.Block (0 ).AllVars ()) {
26
27
all_vars.emplace (var->Name (), var);
Original file line number Diff line number Diff line change @@ -38,4 +38,6 @@ if(WITH_TESTING)
38
38
# both tests/book and analysis depends the models that generated by python/paddle/fluid/tests/book
39
39
add_subdirectory (tests/book )
40
40
endif ()
41
- add_subdirectory (api )
41
+ if (NOT APPLE )
42
+ add_subdirectory (api )
43
+ endif ()
You can’t perform that action at this time.
0 commit comments