Skip to content

Commit 37713f2

Browse files
authored
Merge pull request #12244 from jacquesqiao/fix-mac-build
fix mac build
2 parents 982d423 + 0e30c9d commit 37713f2

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

paddle/fluid/framework/details/multi_devices_graph_builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ std::unique_ptr<Graph> MultiDevSSAGraphBuilder::Apply(
333333
* Only variables should be the leaves of graph.
334334
*/
335335
AddOutputToLeafOps(&result);
336-
return std::move(graph);
336+
return graph;
337337
}
338338

339339
bool MultiDevSSAGraphBuilder::IsSparseGradient(const std::string &og) const {

paddle/fluid/framework/details/ssa_graph_checker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SSAGraghBuilderWithChecker : public SSAGraphBuilder {
3131
std::unique_ptr<Graph> Apply(std::unique_ptr<Graph> graph) const override {
3232
auto new_graph = builder_->Apply(std::move(graph));
3333
PADDLE_ENFORCE(IsValidGraph(new_graph.get()));
34-
return std::move(new_graph);
34+
return new_graph;
3535
}
3636

3737
int GetVarDeviceID(const std::string& var_name) const override {

paddle/fluid/framework/details/ssa_graph_printer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SSAGraghBuilderWithPrinter : public SSAGraphBuilder {
5353
std::unique_ptr<Graph> Apply(std::unique_ptr<Graph> graph) const override {
5454
auto new_graph = builder_->Apply(std::move(graph));
5555
printer_->Print(*new_graph, stream_ref_);
56-
return std::move(new_graph);
56+
return new_graph;
5757
}
5858

5959
int GetVarDeviceID(const std::string& var_name) const override {

paddle/fluid/framework/ir/graph.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace framework {
2121

2222
// NOTE(paddle-dev): This graph contains circle.
2323
Graph::Graph(const ProgramDesc &program) : program_(program) {
24+
VLOG(3) << "block in program:" << program_.Size();
2425
std::unordered_map<std::string, VarDesc *> all_vars;
2526
for (auto *var : program.Block(0).AllVars()) {
2627
all_vars.emplace(var->Name(), var);

paddle/fluid/inference/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ if(WITH_TESTING)
3838
# both tests/book and analysis depends the models that generated by python/paddle/fluid/tests/book
3939
add_subdirectory(tests/book)
4040
endif()
41-
add_subdirectory(api)
41+
if(NOT APPLE)
42+
add_subdirectory(api)
43+
endif()

0 commit comments

Comments
 (0)