Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions paddle/phi/kernels/gpudnn/conv_transpose_grad_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ void ConvTransposeGradRawGPUDNNKernel(const Context& dev_ctx,
out_vec = common::vectorize<int>(transformed_dout.dims());

// ------------------- cudnn descriptors ---------------------
#ifndef PADDLE_WITH_HIP
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_dout);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(filter);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(x_transpose);
#endif

GPUDNNDataLayout layout;

if (strides.size() == 2U) {
Expand Down Expand Up @@ -223,9 +229,6 @@ void ConvTransposeGradRawGPUDNNKernel(const Context& dev_ctx,
SearchResult<miopenConvFwdAlgorithm_t> fwd_result;
SearchResult<miopenConvBwdWeightsAlgorithm_t> filter_result;
#else
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_dout);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(filter);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(x_transpose);
SearchResult<cudnnConvolutionFwdAlgo_t> fwd_result;
SearchResult<cudnnConvolutionBwdFilterAlgo_t> filter_result;
#endif
Expand Down
9 changes: 6 additions & 3 deletions paddle/phi/kernels/gpudnn/conv_transpose_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ void ConvTransposeRawGPUDNNKernel(const Context& dev_ctx,
}
T* transformed_out_data = transformed_out.data<T>();

#ifndef PADDLE_WITH_HIP
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_x);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(filter);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_out);
#endif

GPUDNNDataLayout layout;

int iwo_groups = groups;
Expand Down Expand Up @@ -235,9 +241,6 @@ void ConvTransposeRawGPUDNNKernel(const Context& dev_ctx,
bwd_result.algo =
search::Find<T>(args, false, deterministic, workspace_size, dev_ctx);
#else
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_x);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(filter);
CUDNN_ENFORCE_TENSOR_SIZE_SUPPORTED(transformed_out);
SearchResult<cudnnConvolutionBwdDataAlgo_t> bwd_result;
using search = SearchAlgorithm<ConvKind::kBackwardData>;
bwd_result = search::Find<T>(dev_ctx, args, false, deterministic, false);
Expand Down