-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fixing batch_norm and layer_norm for large tensor nightly test #17805
Conversation
@apeforest @ChaiBapchya I don't know much about layer_norm() or batch_norm() to add suitable shape checks in the tests. I have provided gdb outputs after fixing the code. Can you guys suggest addition of proper shape testing that can be added to |
@mxnet-label-bot add [pr-awaiting-review] |
Layer norm doesn't have such a check in test_large_array.py. Maybe you could add that. Fundamentally, For both batch norm and layer norm, since the operation is just to perform normalization over layer/batch, input shape should be equal to output shape. |
it was incorrect when added check my GDB logs
Its still incorrect.
Actually its better to add the check added in this PR #17683 |
It's very unlikely the number of channels will be greater than 2^31. So this should not cause problem in practice. @sxjscience please confirm. @access2rohit I don't fully understand the gdb output in your description. They seem to stop at different places and what do you want us to see? |
@mxnet-label-bot update [pr-awaiting-merge] |
Co-authored-by: Rohit Kumar Srivastava <[email protected]>
Co-authored-by: Rohit Kumar Srivastava <[email protected]>
Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]>
Co-authored-by: Rohit Kumar Srivastava <[email protected]>
Co-authored-by: Rohit Kumar Srivastava <[email protected]>
This needs to be cherry-picked into v1.x |
* fixing batch_norm and layer_norm for large tensors (#17805) Co-authored-by: Rohit Kumar Srivastava <[email protected]> * Fix nightly large_vector test caused by incorrect with_seed path (#18178) * add back the missing environment function Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]>
* fixing batch_norm and layer_norm for large tensors (apache#17805) Co-authored-by: Rohit Kumar Srivastava <[email protected]> * Fix nightly large_vector test caused by incorrect with_seed path (apache#18178) * add back the missing environment function Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]>
* fixing batch_norm and layer_norm for large tensors (#17805) Co-authored-by: Rohit Kumar Srivastava <[email protected]> * Fix nightly large_vector test caused by incorrect with_seed path (#18178) * add back the missing environment function Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]> Co-authored-by: Rohit Kumar Srivastava <[email protected]>
Description
Enables large tensor support for following ops:
Fixes nightly large tensor failure. Recently more strict input size check was added to layer_norm in this PR: #17683 but that hasn't been added to batch_norm yet so it isn't failing currently but the shape assignment is currently incorrect as shown in the
gdb
logs below.Please look at the lines marked by arrows in GDB logs
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Proof Of Correctness
layer_norm()
Before changes:
After Changes:
batch_norm()
Before changes:
After Changes:
Testing