Conversation
💊 CI failures summary and remediationsAs of commit e4be821 (more details on the Dr. CI page):
Extra GitHub checks: 1 failed
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 11 times. |
Codecov Report
@@ Coverage Diff @@
## master #49109 +/- ##
==========================================
- Coverage 80.73% 80.73% -0.01%
==========================================
Files 1871 1871
Lines 201759 201759
==========================================
- Hits 162888 162885 -3
- Misses 38871 38874 +3 |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| params->dataType = dataType; | ||
| // ASSERT(weight.dim() == input.dim()) | ||
| for (int i = 0; i != input.dim(); ++i) { | ||
| params->input_size[i] = (int) input.size(i); |
There was a problem hiding this comment.
Can you please do unchecked accesses here? input.sizes()[i]
There was a problem hiding this comment.
will fix in later PR
There was a problem hiding this comment.
IIRC, these were all from the old code, right?
There was a problem hiding this comment.
Yes, they are, but that's not a reason not to fix them.
|
|
||
| // Input | ||
| checkDimRange(c, input, 3, 6 /* exclusive */); | ||
| checkSize(c, input, input_channels_dim, weight->size(1) * groups); |
There was a problem hiding this comment.
unchecked access for size(1)
|
|
||
| auto layout = cudnn_conv_use_channels_last(*input, *weight) ? | ||
| at::MemoryFormat::ChannelsLast : at::MemoryFormat::Contiguous; | ||
| auto output_t = at::empty( |
There was a problem hiding this comment.
you can do at::native::empty_cuda here to avoid dispatch
|
|
||
| Tensor grad_input, grad_weight; | ||
| if (output_mask[0]) { | ||
| grad_input = at::cudnn_convolution_transpose_backward_input(grad_output, weight, padding, stride, dilation, groups, benchmark, deterministic, allow_tf32); |
There was a problem hiding this comment.
Maybe you could call cudnn_convolution_forward directly here, and get rid of cudnn_convolution and cudnn_convolution_transpose_backward_input? Do they provide any value?
There was a problem hiding this comment.
I think the value is a better error message, i.e. correctly calling it grad_output instead of input
Summary: - Resolves ngimel's review comments in #49109 - Move `ConvolutionArgs` from `ConvShared.h` to `Conv_v7.cpp`, because cuDNN v8 uses different descriptors therefore will not share the same `ConvolutionArgs`. - Refactor the `ConvolutionParams` (the hash key for benchmark): - Remove `input_stride` - Add `input_dim` - Add `memory_format` - Make `repro_from_args` to take `ConvolutionParams` instead of `ConvolutionArgs` as arguments so that it can be shared for v7 and v8 - Rename some `layout` to `memory_format`. `layout` should be sparse/strided and `memory_format` should be contiguous/channels_last. They are different things. Pull Request resolved: #50827 Reviewed By: bdhirsh Differential Revision: D26048274 Pulled By: ezyang fbshipit-source-id: f71aa02d90ffa581c17ab05b171759904b311517
Summary: cuDNN v7 API has been deprecated, so we need to migrate to cuDNN v8 API. The v8 API does not exist on cuDNN 7, so there will be a long time both API should exist. This is step 0 of adding cuDNN v8 API. There is no real code change in this PR. It just copy-pastes existing code. The original `Conv.cpp` is split into `ConvPlaceholders.cpp`, `ConvShared.cpp`, `ConvShared.h`, `Conv_v7.cpp`, `Conv_v8.cpp`. Currently `Conv_v8.cpp` is empty, and will be filled in the future. The `ConvPlaceholders.cpp` contains placeholder implementation of cudnn convolution when cudnn is not enabled. These operators only raise errors and do no real computation. This file also contains deprecated operators. These operators are implemented using current operators. The `ConvShared.cpp` and `ConvShared.h` contains code that will be shared by the v7 and v8 API, these include the definition of struct `ConvolutionParams` and `ConvolutionArgs`. As well as ATen exposed API like `cudnn_convolution` and intermediate `cudnn_convolution_forward`. These exposed functions will call raw API like `raw_cudnn_convolution_forward_out` in `Conv_v7.cpp` or `Conv_v8.cpp` for the real implementation. The `Conv_v7.cpp`, `Conv_v8.cpp` contains the implementation of raw APIs, and are different for v7 and v8. Pull Request resolved: pytorch#49109 Reviewed By: H-Huang Differential Revision: D25463783 Pulled By: ezyang fbshipit-source-id: 1c80de8e5d94d97a61e45687f6193e8ff5481e3e
Summary: - Resolves ngimel's review comments in pytorch#49109 - Move `ConvolutionArgs` from `ConvShared.h` to `Conv_v7.cpp`, because cuDNN v8 uses different descriptors therefore will not share the same `ConvolutionArgs`. - Refactor the `ConvolutionParams` (the hash key for benchmark): - Remove `input_stride` - Add `input_dim` - Add `memory_format` - Make `repro_from_args` to take `ConvolutionParams` instead of `ConvolutionArgs` as arguments so that it can be shared for v7 and v8 - Rename some `layout` to `memory_format`. `layout` should be sparse/strided and `memory_format` should be contiguous/channels_last. They are different things. Pull Request resolved: pytorch#50827 Reviewed By: bdhirsh Differential Revision: D26048274 Pulled By: ezyang fbshipit-source-id: f71aa02d90ffa581c17ab05b171759904b311517
cuDNN v7 API has been deprecated, so we need to migrate to cuDNN v8 API. The v8 API does not exist on cuDNN 7, so there will be a long time both API should exist.
This is step 0 of adding cuDNN v8 API. There is no real code change in this PR. It just copy-pastes existing code. The original
Conv.cppis split intoConvPlaceholders.cpp,ConvShared.cpp,ConvShared.h,Conv_v7.cpp,Conv_v8.cpp. CurrentlyConv_v8.cppis empty, and will be filled in the future.The
ConvPlaceholders.cppcontains placeholder implementation of cudnn convolution when cudnn is not enabled. These operators only raise errors and do no real computation. This file also contains deprecated operators. These operators are implemented using current operators.The
ConvShared.cppandConvShared.hcontains code that will be shared by the v7 and v8 API, these include the definition of structConvolutionParamsandConvolutionArgs. As well as ATen exposed API likecudnn_convolutionand intermediatecudnn_convolution_forward. These exposed functions will call raw API likeraw_cudnn_convolution_forward_outinConv_v7.cpporConv_v8.cppfor the real implementation.The
Conv_v7.cpp,Conv_v8.cppcontains the implementation of raw APIs, and are different for v7 and v8.