From 74e355254716f5bf581de71858c8bfc5fbd32763 Mon Sep 17 00:00:00 2001 From: xulei Date: Tue, 22 Mar 2022 20:08:35 +0800 Subject: [PATCH] fix mac undefined symbol error --- mindspore/ccsrc/runtime/graph_scheduler/CMakeLists.txt | 1 + mindspore/ccsrc/runtime/graph_scheduler/graph_compiler.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/runtime/graph_scheduler/CMakeLists.txt b/mindspore/ccsrc/runtime/graph_scheduler/CMakeLists.txt index b8bc9c6da56..2c2809c52fc 100644 --- a/mindspore/ccsrc/runtime/graph_scheduler/CMakeLists.txt +++ b/mindspore/ccsrc/runtime/graph_scheduler/CMakeLists.txt @@ -12,4 +12,5 @@ endif() set_property(SOURCE ${GRAPH_SCHEDULER_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_RUNTIME_FRAMEWORK) + add_library(_mindspore_runtime_graph_scheduler_obj OBJECT ${GRAPH_SCHEDULER_SRC_LIST}) \ No newline at end of file diff --git a/mindspore/ccsrc/runtime/graph_scheduler/graph_compiler.h b/mindspore/ccsrc/runtime/graph_scheduler/graph_compiler.h index 16746f3f9cb..3942a412d85 100644 --- a/mindspore/ccsrc/runtime/graph_scheduler/graph_compiler.h +++ b/mindspore/ccsrc/runtime/graph_scheduler/graph_compiler.h @@ -29,6 +29,7 @@ #include "backend/common/session/session_basic.h" #include "backend/common/session/session_factory.h" #include "ir/tensor.h" +#include "include/backend/visible.h" namespace mindspore { using device::DeviceContext; @@ -55,7 +56,7 @@ using KernelMapPosition = std::map, session // The origin parameters order is used to correspond to the input args. // The origin outputs order is used to correspond to the output args. // The need_erase means need erase this GraphCompilerInfo object after run actor set. -struct GraphCompilerInfo { +struct BACKEND_EXPORT GraphCompilerInfo { GraphCompilerInfo(const std::vector &graphs, const std::vector &device_contexts, const std::vector *> &tensors_mask, const std::vector *> &input_tensors,