!29679 [MS][LITE] fix SetData interface bug

Merge pull request !29679 from jianghui58/bugfix_0129
This commit is contained in:
i-robot 2022-02-12 09:54:33 +00:00 committed by Gitee
commit b961b313f0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 13 additions and 3 deletions

View File

@ -250,6 +250,12 @@ class MS_API MSTensor {
/// \brief Set the data for the MSTensor. Only valid for Lite.
///
/// \note Deprecated, this interface will be removed in the next iteration
///
/// \note A pointer to the data should be created by malloc interface
///
/// \note The memory pointed to origin data pointer of MSTensor needs to be managed by the user
///
/// \param[in] A pointer to the data of the MSTensor.
void SetData(void *data);

View File

@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2022 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
* Copyright 2022 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -173,7 +173,7 @@ Result CustomCPUKernel::InitInputsLinkMap() {
}
MS_LOG(INFO) << "om bottom name is below:";
auto om_inputs_num = svp_acl_mdl_get_num_inputs(model_desc_);
for (size_t j = 0; j < om_inputs_num; i++) {
for (size_t j = 0; j < om_inputs_num; j++) {
std::string om_bottom_name = svp_acl_mdl_get_input_name_by_index(model_desc_, j);
MS_LOG(INFO) << " om bottom index: " << static_cast<int>(j)
<< ", om bottom name: " << om_bottom_name.c_str();

View File

@ -0,0 +1,4 @@
approvers:
- jpc_chenjianping
reviewers:
- jianghui58