From 67ba884d2a9f564ac9cb154dbfa5234e244069d5 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Sat, 7 Apr 2018 17:48:07 -0700 Subject: [PATCH] Update CMakeLists --- paddle/fluid/memory/CMakeLists.txt | 11 +++++------ paddle/fluid/memory/{memory.cc => malloc.cc} | 0 paddle/fluid/memory/{memory.h => malloc.h} | 0 .../fluid/memory/{memory_test.cc => malloc_test.cc} | 1 - paddle/fluid/memory/pinned_memory_test.cu | 1 - paddle/fluid/platform/CMakeLists.txt | 4 ++-- 6 files changed, 7 insertions(+), 10 deletions(-) rename paddle/fluid/memory/{memory.cc => malloc.cc} (100%) rename paddle/fluid/memory/{memory.h => malloc.h} (100%) rename paddle/fluid/memory/{memory_test.cc => malloc_test.cc} (99%) diff --git a/paddle/fluid/memory/CMakeLists.txt b/paddle/fluid/memory/CMakeLists.txt index 3b73e79eb3f..c928a8e493f 100644 --- a/paddle/fluid/memory/CMakeLists.txt +++ b/paddle/fluid/memory/CMakeLists.txt @@ -1,15 +1,14 @@ add_subdirectory(detail) -cc_library(memory SRCS memory.cc DEPS place enforce) +cc_library(malloc SRCS malloc.cc DEPS buddy_allocator place enforce) cc_library(memcpy SRCS memcpy.cc DEPS place) -cc_library(paddle_memory +cc_library(memory DEPS - memory - memcpy - buddy_allocator) + malloc + memcpy) -cc_test(memory_test SRCS memory_test.cc DEPS place paddle_memory) +cc_test(malloc_test SRCS malloc_test.cc DEPS malloc) #if (WITH_GPU) # nv_test(pinned_memory_test SRCS pinned_memory_test.cu DEPS place paddle_memory) diff --git a/paddle/fluid/memory/memory.cc b/paddle/fluid/memory/malloc.cc similarity index 100% rename from paddle/fluid/memory/memory.cc rename to paddle/fluid/memory/malloc.cc diff --git a/paddle/fluid/memory/memory.h b/paddle/fluid/memory/malloc.h similarity index 100% rename from paddle/fluid/memory/memory.h rename to paddle/fluid/memory/malloc.h diff --git a/paddle/fluid/memory/memory_test.cc b/paddle/fluid/memory/malloc_test.cc similarity index 99% rename from paddle/fluid/memory/memory_test.cc rename to paddle/fluid/memory/malloc_test.cc index 9fbbe62559b..6d68eed1a84 100644 --- a/paddle/fluid/memory/memory_test.cc +++ b/paddle/fluid/memory/malloc_test.cc @@ -18,7 +18,6 @@ limitations under the License. */ #include "gtest/gtest.h" #include "paddle/fluid/memory/detail/memory_block.h" -#include "paddle/fluid/memory/detail/meta_data.h" #include "paddle/fluid/platform/cpu_info.h" #include "paddle/fluid/platform/gpu_info.h" #include "paddle/fluid/platform/place.h" diff --git a/paddle/fluid/memory/pinned_memory_test.cu b/paddle/fluid/memory/pinned_memory_test.cu index a000001f417..0d898f59ee1 100644 --- a/paddle/fluid/memory/pinned_memory_test.cu +++ b/paddle/fluid/memory/pinned_memory_test.cu @@ -15,7 +15,6 @@ limitations under the License. */ #include #include "paddle/fluid/memory/detail/memory_block.h" -#include "paddle/fluid/memory/detail/meta_data.h" #include "paddle/fluid/memory/memcpy.h" #include "paddle/fluid/memory/memory.h" diff --git a/paddle/fluid/platform/CMakeLists.txt b/paddle/fluid/platform/CMakeLists.txt index 49ff589b770..917bdc64abf 100644 --- a/paddle/fluid/platform/CMakeLists.txt +++ b/paddle/fluid/platform/CMakeLists.txt @@ -42,12 +42,12 @@ ENDIF() # memcpy depends on device_context, here add deps individually for # avoiding cycle dependencies -cc_library(device_context SRCS device_context.cc DEPS memory buddy_allocator +cc_library(device_context SRCS device_context.cc DEPS malloc place eigen3 ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS}) nv_test(device_context_test SRCS device_context_test.cu DEPS device_context gpu_info) nv_test(cudnn_helper_test SRCS cudnn_helper_test.cc DEPS dynload_cuda) -nv_test(transform_test SRCS transform_test.cu DEPS paddle_memory place device_context) +nv_test(transform_test SRCS transform_test.cu DEPS memory place device_context) cc_library(device_tracer SRCS device_tracer.cc DEPS boost profiler_proto ${GPU_CTX_DEPS}) cc_library(profiler SRCS profiler.cc DEPS device_context device_tracer) -- GitLab