Merge pull request !31443 from zhengyuanhua/master
This commit is contained in:
i-robot 2022-03-21 01:34:40 +00:00 committed by Gitee
commit e59c7620e7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -23,6 +23,7 @@
namespace mindspore {
namespace lite {
constexpr auto kBase = 10;
constexpr auto kBufMaxSize = 1024;
Status CustomInterface::Infer(std::vector<mindspore::MSTensor> *inputs, std::vector<mindspore::MSTensor> *outputs,
@ -52,11 +53,11 @@ Status CustomInterface::Infer(std::vector<mindspore::MSTensor> *inputs, std::vec
char *save_ptr = nullptr;
res = strtok_r(buf, delims, &save_ptr);
while (res != nullptr && id < outputs->size()) {
int64_t dims_num = strtol(res, &res, 10);
int64_t dims_num = strtol(res, &res, kBase);
std::vector<int64_t> shape(dims_num);
for (int64_t j = 0; j < dims_num; j++) {
res = strtok_r(nullptr, delims, &save_ptr);
shape[j] = static_cast<int64_t>(strtol(res, &res, 10));
shape[j] = static_cast<int64_t>(strtol(res, &res, kBase));
}
(*outputs)[id].SetShape(shape);
id += 1;

View File

@ -30,7 +30,6 @@ namespace mindspore {
namespace lite {
namespace {
constexpr auto kNameReduceInputNum = 3;
} // namespace
STATUS ReduceFusionMapper::Mapper(const CNodePtr &cnode) {