Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[v1.x][LT] Add forward & backward linalg.gemm test for large size #18825

Merged
merged 2 commits into from Jul 30, 2020

Conversation

ChaiBapchya
Copy link
Contributor

@ChaiBapchya ChaiBapchya commented Jul 30, 2020

Description

Tests mx.nd.linalg.gemm operator for large size tensor [not large dimension]

Results

 python3 -m pytest -s --exitfirst --verbose tests/nightly/test_large_array.py::test_linalg

============================================================================================================================= test session starts ==============================================================================================================================
platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /home/ubuntu/anaconda3/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/ubuntu/chai-mxnet/.hypothesis/examples')
rootdir: /home/ubuntu/chai-mxnet
plugins: remotedata-0.3.2, openfiles-0.4.0, astropy-header-0.1.2, hypothesis-5.8.3, arraydiff-0.3, doctestplus-0.5.0
collected 1 item

tests/nightly/test_large_array.py::test_linalg [05:24:49] ../src/base.cc:84: Upgrade advisory: this mxnet has been built against cuDNN lib version 7501, which is older than the oldest version tested by CI (7600).  Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
PASSED

=============================================================================================================================== warnings summary ===============================================================================================================================
/home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12
  /home/ubuntu/anaconda3/lib/python3.7/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    from imp import find_module, load_module, acquire_lock, release_lock

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================================================================================================================== 1 passed, 1 warning in 583.43s (0:09:43) ===================================================================================================================

Comments

  • FIxes indent in linalg.gemm2 test
  • Removes hardcode & replaces with "perturbation" for gradient checks

@mxnet-bot
Copy link

Hey @ChaiBapchya , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [website, windows-cpu, sanity, centos-cpu, edge, miscellaneous, unix-cpu, clang, centos-gpu, windows-gpu, unix-gpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@access2rohit
Copy link
Contributor

left nitpicky comments. Rest LGTM !

out = mx.nd.linalg.gemm(inp1, inp2, inp3, transpose_b=True)
return inp1.grad, inp2.grad, inp3.grad, out

inp1 = mx.nd.ones(shape=(MEDIUM_X, SMALL_Y, MEDIUM_X))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces around =

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's incorrect according to PEP8 style guide Python
https://www.python.org/dev/peps/pep-0008/
Screen Shot 2020-07-30 at 1 05 56 AM

inp1 = mx.nd.ones(shape=(MEDIUM_X, SMALL_Y, MEDIUM_X))
perturbation = 0.2
inp1[0][0][0] = perturbation
inp2 = mx.nd.ones(shape=(MEDIUM_X, SMALL_Y, MEDIUM_X))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces around =

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's incorrect according to PEP8 style guide Python
https://www.python.org/dev/peps/pep-0008/
Screen Shot 2020-07-30 at 1 05 56 AM

perturbation = 0.2
inp1[0][0][0] = perturbation
inp2 = mx.nd.ones(shape=(MEDIUM_X, SMALL_Y, MEDIUM_X))
inp3 = mx.nd.ones(shape=(MEDIUM_X, SMALL_Y, SMALL_Y))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's incorrect according to PEP8 style guide Python
https://www.python.org/dev/peps/pep-0008/
Screen Shot 2020-07-30 at 1 05 56 AM

@ChaiBapchya
Copy link
Contributor Author

@mxnet-bot run ci [centos-cpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-cpu]

@sandeep-krishnamurthy sandeep-krishnamurthy merged commit 84c9e0d into apache:v1.x Jul 30, 2020
@ChaiBapchya ChaiBapchya deleted the add_lt_gemm_test branch July 30, 2020 19:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants