Skip to content

Commit 94a741d

Browse files
authored
Merge pull request #11413 from jacquesqiao/fix-build
fix build on mac
2 parents 489f581 + 82416f1 commit 94a741d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

paddle/fluid/framework/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cc_library(lod_rank_table SRCS lod_rank_table.cc DEPS lod_tensor)
8484
cc_library(feed_fetch_method SRCS feed_fetch_method.cc DEPS lod_tensor scope glog)
8585

8686
if(WITH_DISTRIBUTE)
87-
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method sendrecvop_grpc grpc++_unsecure grpc_unsecure gpr)
87+
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method sendrecvop_grpc cares grpc++_unsecure grpc_unsecure gpr)
8888
set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
8989
set_source_files_properties(executor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
9090
else()

paddle/fluid/platform/cpu_info.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ inline size_t CpuTotalPhysicalMemory() {
5959
size_t CpuMaxAllocSize() {
6060
// For distributed systems, it requires configuring and limiting
6161
// the fraction of memory to use.
62-
return std::min(static_cast<size_t>(FLAGS_fraction_of_cpu_memory_to_use *
63-
CpuTotalPhysicalMemory()),
64-
FLAGS_initial_cpu_memory_in_mb * 1 << 20);
62+
return std::min(
63+
static_cast<size_t>(FLAGS_fraction_of_cpu_memory_to_use *
64+
CpuTotalPhysicalMemory()),
65+
static_cast<size_t>(FLAGS_initial_cpu_memory_in_mb * 1 << 20));
6566
}
6667

6768
size_t CpuMinChunkSize() {

0 commit comments

Comments
 (0)