diff --git a/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc b/mindspore/ccsrc/cxx_api/model/ms/ms_model.cc index 5a4366d0b7..23bac732b8 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;