From 66f684ad7d6970af6c8f3876ece29c0ba82c3fbd Mon Sep 17 00:00:00 2001 From: wilfChen Date: Mon, 8 Mar 2021 19:39:12 +0800 Subject: [PATCH] register ModelImpl with compile macro --- mindspore/ccsrc/cxx_api/model/ms/ms_model.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc b/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc index 9a07105a22..63c1ce7f20 100644 --- a/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc +++ b/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc @@ -21,8 +21,12 @@ #include "cxx_api/factory.h" namespace mindspore { +// mindspore-serving check current package for version check with ModelImpl factory. +#if ENABLE_D API_FACTORY_REG(ModelImpl, Ascend910, MsModel); +#elif ENABLE_GPU API_FACTORY_REG(ModelImpl, GPU, MsModel); +#endif static std::string GenerateShapeKey(const std::vector> &dims) { std::string shape_key;