From 78b903f09068ccc1ddd21cae1108775d0fb478e0 Mon Sep 17 00:00:00 2001 From: hbhu_bin Date: Tue, 6 Dec 2022 16:11:54 +0800 Subject: [PATCH] fix-Conv3dTranspose-Resize --- .../ccsrc/plugin/device/gpu/kernel/nn/conv3d_gpu_kernel.cc | 2 ++ .../plugin/device/gpu/kernel/nn/conv3d_grad_filter_gpu_kernel.h | 2 ++ .../plugin/device/gpu/kernel/nn/conv3d_transpose_gpu_kernel.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_gpu_kernel.cc b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_gpu_kernel.cc index 5991650ca56..0814f05c327 100644 --- a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_gpu_kernel.cc +++ b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_gpu_kernel.cc @@ -188,6 +188,8 @@ void Conv3dGpuKernelMod::SelectAlgorithm(cudnnTensorDescriptor_t input_descripto } void Conv3dGpuKernelMod::SetStrideAndDilation(std::vector stride_me, std::vector dilation_me) { + stride_.clear(); + dilation_.clear(); (void)std::transform(stride_me.begin(), stride_me.end(), std::back_inserter(stride_), [](const int64_t &value) { return static_cast(value); }); (void)std::transform(dilation_me.begin(), dilation_me.end(), std::back_inserter(dilation_), diff --git a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_grad_filter_gpu_kernel.h b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_grad_filter_gpu_kernel.h index 9e565414abd..4cd51fd50f2 100644 --- a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_grad_filter_gpu_kernel.h +++ b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_grad_filter_gpu_kernel.h @@ -324,6 +324,8 @@ class Conv3dGradFilterGpuKernelMod : public NativeGpuKernelMod { } void SetStrideAndDilation(std::vector stride_me, std::vector dilation_me) { + stride_.clear(); + dilation_.clear(); (void)std::transform(stride_me.begin(), stride_me.end(), std::back_inserter(stride_), [](const int64_t &value) { return static_cast(value); }); (void)std::transform(dilation_me.begin(), dilation_me.end(), std::back_inserter(dilation_), diff --git a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_transpose_gpu_kernel.cc b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_transpose_gpu_kernel.cc index 42bdefaf29f..afbe96cdc49 100644 --- a/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_transpose_gpu_kernel.cc +++ b/mindspore/ccsrc/plugin/device/gpu/kernel/nn/conv3d_transpose_gpu_kernel.cc @@ -224,6 +224,8 @@ void Conv3dTransposeFwdGpuKernelMod::Set5DDesc(const ShapeVector &input_shape, c void Conv3dTransposeFwdGpuKernelMod::SetStrideAndDilation(std::vector stride_me, std::vector dilation_me) { + stride_.clear(); + dilation_.clear(); (void)std::transform(stride_me.begin(), stride_me.end(), std::back_inserter(stride_), [](const int64_t &value) { return static_cast(value); }); (void)std::transform(dilation_me.begin(), dilation_me.end(), std::back_inserter(dilation_),