From 5486fff87a994f8a12e6637a5695c41cad85fa90 Mon Sep 17 00:00:00 2001 From: chenyemeng Date: Tue, 22 Dec 2020 16:23:38 +0800 Subject: [PATCH] GeTensor aligned addr & zero copy support --- ge/graph/manager/host_mem_manager.h | 2 +- ge/graph/preprocess/graph_preprocess.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ge/graph/manager/host_mem_manager.h b/ge/graph/manager/host_mem_manager.h index 72b65b27..0a7f2a90 100644 --- a/ge/graph/manager/host_mem_manager.h +++ b/ge/graph/manager/host_mem_manager.h @@ -42,7 +42,7 @@ struct SharedMemInfo { uint64_t mem_size = 0; int fd = 0; uint8_t *device_address = nullptr; -#if !ENABLE_OPEN_SRC +#if (ENABLE_OPEN_SRC != True) std::shared_ptr host_aligned_ptr = nullptr; #else uint8_t *host_address = nullptr; diff --git a/ge/graph/preprocess/graph_preprocess.cc b/ge/graph/preprocess/graph_preprocess.cc index bea6aa6e..e4709178 100644 --- a/ge/graph/preprocess/graph_preprocess.cc +++ b/ge/graph/preprocess/graph_preprocess.cc @@ -37,6 +37,9 @@ #include "graph/passes/addn_pass.h" #include "graph/passes/aicpu_constant_folding_pass.h" #include "graph/passes/assert_pass.h" +#if (ENABLE_OPEN_SRC == True) +#include "graph/passes/assign_pass.h" +#endif #include "graph/passes/common_subexpression_elimination_pass.h" #include "graph/passes/cond_pass.h" #include "graph/passes/cond_remove_pass.h"