Skip to content

Commit b3577e9

Browse files
committed
fixed cuda build issue
1 parent ec0be28 commit b3577e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

onnxruntime/core/providers/cuda/nn/conv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ template <typename T>
145145
class Conv : public CudaKernel {
146146
public:
147147
Conv(const OpKernelInfo& info) : CudaKernel(info), conv_attrs_(info) {
148-
auto pads_size = pads.size();
148+
auto pads_size = conv_attrs_.pads.size();
149149
ORT_ENFORCE(pads_size % 2 == 0);
150150
auto rank = pads_size / 2;
151151
for (size_t i = 0; i < rank; i++) {
152-
ORT_ENFORCE(pads[i] == pads[i + rank], "cudnn only supports symmetric padding");
152+
ORT_ENFORCE(conv_attrs_.pads[i] == conv_attrs_.pads[i + rank], "cudnn only supports symmetric padding");
153153
}
154154
}
155155

onnxruntime/core/providers/cuda/nn/conv_transpose.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Status ConvTranspose<T>::DoConvTranspose(OpKernelContext* context, bool dynamic_
5858
s_.cached_benchmark_results.clear();
5959
}
6060

61-
Prepare p;
61+
ConvTransposeAttributes::Prepare p;
6262
ORT_RETURN_IF_ERROR(conv_transpose_attrs_.PrepareForCompute(context, has_bias, p, dynamic_padding));
6363

6464
const auto& y_dims = p.Y->Shape().GetDims();
@@ -74,7 +74,7 @@ Status ConvTranspose<T>::DoConvTranspose(OpKernelContext* context, bool dynamic_
7474
ORT_RETURN_IF_ERROR(s_.conv_desc.Set(p.kernel_shape.size(), p.pads, p.strides,
7575
p.dilations, mode, CudnnTensor::GetDataType<CudaT>()));
7676
CUDNN_RETURN_IF_ERROR(cudnnSetConvolutionGroupCount(s_.conv_desc,
77-
gsl::narrow_cast<int>(conv_transpose_attrs_.group_)));
77+
gsl::narrow_cast<int>(conv_transpose_attrs_.group)));
7878

7979
if (has_bias) {
8080
const auto& b_shape = p.B->Shape();

0 commit comments

Comments
 (0)