-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[v1.x][FEATURE] Add MKLDNN Deconvolution 1D and 3D support #20137
Conversation
Hey @PawelGlomski-Intel , Thanks for submitting the PR
CI supported jobs: [centos-gpu, website, centos-cpu, miscellaneous, windows-cpu, windows-gpu, clang, edge, unix-cpu, unix-gpu, sanity] Note: |
@@ -471,8 +471,8 @@ def check_convolution_training(stype): | |||
@with_seed() | |||
def test_Deconvolution(): | |||
def check_Deconvolution_training(stype): | |||
for shape in [(3, 3, 10, 10)]: # testing only 2D for now | |||
data_tmp = np.random.randint(256, size=shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was randint(256, size=shape)
here for a reason? All other tests have normal(-0.1, 1, size=shape)
for input values, could this be the reason why was this test flaky? I couldn't reproduce #12579 in my version of the test.
const uint32_t num_group) { | ||
std::vector<int> order(desc.data.ndims); | ||
std::iota(std::begin(order), std::end(order), 0); | ||
const int offset = static_cast<int>(num_group > 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This offset returns true or false; Why do we need to do static_cast to int? Basically; O0-optimization will treat it like a: mov DWORD PTR [rbp-4], 0
, when a boolean type will have mov BYTE PTR [rbp-1], 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted it to be clear that I am using boolean value as an integer and to avoid implicit conversion later on.
465c859
to
c9ddd2f
Compare
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@szha Can you please review this? |
Merged. Thank you @PawelGlomski-Intel |
…t and fix bias (#20292) * [v1.x][BUGFIX] Implement oneDNN deconvolution primitives to deconvolution 2D (#20107) * Use mkldnn deconvolution primitive in deconvolution * Apply clang-format * Refactor deconvolution version 1 * Refactor deconvolution version 2 and use permute_axes in IOLogicalSwapDesc * Refactor deconvolution version 3 * Enable Deconvolution2D test * Fix sanity * Fix windows builds * Fix deconvolution with bias test * [v1.x][FEATURE] Add MKLDNN Deconvolution 1D and 3D support (#20137) * Use MXNET_USE_ONEDNN * Fix test * Apply formatter * Add native support for 3D deconvolution * Remove outdated check * Replace math.prod with np.prod * Check convolution layout only when it has value * Remove outdated check * Change tests * Increase default workspace size to mach convolution * Fix deconv workspace size * Increase default deconv workspace size in python API * Disable 3D tests for GPU * Add deconv arguments checks * Remove next_impl calls until it is fixed * Share workspace * Fix documentation * Add test_deconv_dilation * Fix check * Fix include order
…20726) Co-authored-by: Paweł Głomski <[email protected]>
Description
Adds Deconvolution 1D and 3D support with MKLDNN #19904
Checklist
Essentials
Changes