This is an automated email from the ASF dual-hosted git repository. zhasheng pushed a commit to branch v1.x in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/v1.x by this push: new 85eb528 Add syrk test shape check (#18812) 85eb528 is described below commit 85eb528c1f53cc3b88ea4596d02d6bfa251b9953 Author: Zhaoqi Zhu <zhaoq...@usc.edu> AuthorDate: Tue Jul 28 23:08:53 2020 -0700 Add syrk test shape check (#18812) * add shape check * add name to contributor.md Co-authored-by: Ubuntu <ubu...@ip-172-31-6-47.us-west-2.compute.internal> --- CONTRIBUTORS.md | 1 + tests/nightly/test_large_array.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index bd7f966..be04d82 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -252,6 +252,7 @@ List of Contributors * [Oliver Kowalke](https://github.com/olk) * [Connor Goggins](https://github.com/connorgoggins) * [Joe Evans](https://github.com/josephevans) +* [Zhaoqi Zhu](https://github.com/zha0q1) Label Bot --------- diff --git a/tests/nightly/test_large_array.py b/tests/nightly/test_large_array.py index 306c827..8865eae 100644 --- a/tests/nightly/test_large_array.py +++ b/tests/nightly/test_large_array.py @@ -1201,9 +1201,11 @@ def test_linalg(): A.attach_grad() with mx.autograd.record(): out = nd.linalg.syrk(A, alpha=2, transpose=False) + assert out.shape == (2, LARGE_SQ_X, LARGE_SQ_X) assert out[0,0,0] == 2 assert_almost_equal(out[1,0,0], nd.array([0.02]), rtol=1e-3, atol=1e-5) out.backward() + assert A.grad.shape == (2, LARGE_SQ_X, LARGE_SQ_X) assert A.grad[0,0,0] == 4 assert_almost_equal(A.grad[1,0,0], nd.array([0.4]), rtol=1e-3, atol=1e-5)