!46221 reduce类算子,动态shape场景下,kernel_mod的all_match_、need_skip_execute未置为默认值;kernel_mod复用场景可能出现问题。

Merge pull request !46221 from huoxinyou/1130reducegpu
This commit is contained in:
i-robot 2022-11-30 09:19:19 +00:00 committed by Gitee
commit 636e62d371
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 0 deletions

View File

@ -179,6 +179,8 @@ void ArrayReduceGpuKernelMod::InitCudnnResource() {
int ArrayReduceGpuKernelMod::Resize(const BaseOperatorPtr &base_operator, const std::vector<KernelTensorPtr> &inputs, int ArrayReduceGpuKernelMod::Resize(const BaseOperatorPtr &base_operator, const std::vector<KernelTensorPtr> &inputs,
const std::vector<KernelTensorPtr> &outputs, const std::vector<KernelTensorPtr> &outputs,
const std::map<uint32_t, tensor::TensorPtr> &inputsOnHost) { const std::map<uint32_t, tensor::TensorPtr> &inputsOnHost) {
need_skip_execute_ = false;
all_match_ = false;
int ret = KernelMod::Resize(base_operator, inputs, outputs, inputsOnHost); int ret = KernelMod::Resize(base_operator, inputs, outputs, inputsOnHost);
if (ret != KRET_OK) { if (ret != KRET_OK) {
InitCudnnResource(); InitCudnnResource();