Browse Source

register ModelImpl with compile macro

tags/v1.2.0-rc1
wilfChen 4 years ago
parent
commit
66f684ad7d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ccsrc/cxx_api/model/ms/ms_model.cc

+ 4
- 0
mindspore/ccsrc/cxx_api/model/ms/ms_model.cc View File

@@ -21,8 +21,12 @@
#include "cxx_api/factory.h" #include "cxx_api/factory.h"


namespace mindspore { namespace mindspore {
// mindspore-serving check current package for version check with ModelImpl factory.
#if ENABLE_D
API_FACTORY_REG(ModelImpl, Ascend910, MsModel); API_FACTORY_REG(ModelImpl, Ascend910, MsModel);
#elif ENABLE_GPU
API_FACTORY_REG(ModelImpl, GPU, MsModel); API_FACTORY_REG(ModelImpl, GPU, MsModel);
#endif


static std::string GenerateShapeKey(const std::vector<std::vector<int64_t>> &dims) { static std::string GenerateShapeKey(const std::vector<std::vector<int64_t>> &dims) {
std::string shape_key; std::string shape_key;


Loading…
Cancel
Save