!49103 fix tensorarray stack

Merge pull request !49103 from VectorSL/fix-tensorarry-stack
This commit is contained in:
i-robot 2023-02-20 11:51:23 +00:00 committed by Gitee
commit 636a67002f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 1 deletions

View File

@ -51,9 +51,15 @@ void TensorArrayStackCpuKernelMod::InitKernel(const CNodePtr &kernel_node) {
} else {
value_size_ = ele_size_ * LongToSize(size);
}
is_need_retrieve_output_shape_ = true;
}
void TensorArrayStackCpuKernelMod::InitInputOutputSize(const CNodePtr &kernel_node) {
MS_EXCEPTION_IF_NULL(kernel_node);
output_size_list_.clear();
input_size_list_.clear();
output_size_list_.push_back(value_size_);
input_size_list_.push_back(sizeof(int64_t));
is_need_retrieve_output_shape_ = true;
}
void TensorArrayStackCpuKernelMod::PostExecute() {

View File

@ -33,6 +33,7 @@ class TensorArrayStackCpuKernelMod : public DeprecatedNativeCpuKernelMod {
bool Launch(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) override;
void InitKernel(const CNodePtr &kernel_node) override;
void InitInputOutputSize(const CNodePtr &kernel_node);
std::vector<KernelAttr> GetOpSupport() override {
static const std::vector<KernelAttr> support_list = {