Browse Source

!13000 Register ModelImpl with compile macro for version check

From: @wilfchen
Reviewed-by: @limingqi107,@cristoval
Signed-off-by: @cristoval
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
34c0418ac1
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"

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<std::vector<int64_t>> &dims) {
std::string shape_key;


Loading…
Cancel
Save