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

Added more tests for Large Indices #15960

Merged
merged 5 commits into from
Aug 30, 2019

Conversation

access2rohit
Copy link
Contributor

@access2rohit access2rohit commented Aug 21, 2019

Description

Added tests for remainder of Ops that are required to support DGL on MXNet. Changes to support Large Indices in one_hot and slice_axis operators.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Testing

~/incubator-mxnet (new_ops_large_vector) $ MXNET_TEST_COUNT=1 nosetests --logging-level=DEBUG --verbose -s tests/nightly/test_large_vector.py

/home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np .dtype(float).type.
from ._conv import register_converters as _register_converters
test_large_vector.test_slice ... ok
test_large_vector.test_ndarray_zeros ... ok
test_large_vector.test_ndarray_ones ... ok
test_large_vector.test_ndarray_random_uniform ... [DEBUG] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1631832474 to reproduce.
ok
test_large_vector.test_ndarray_random_randint ... [DEBUG] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=1887298151 to reproduce.
ok
test_large_vector.test_ndarray_empty ... ok
test_large_vector.test_elementwise ... ok
test_large_vector.test_reduce ... ok
test_large_vector.test_clip ... ok
test_large_vector.test_argmin ... ok
test_large_vector.test_take ... ok
test_large_vector.test_slice_assign ... ok
test_large_vector.test_expand_dims ... ok
test_large_vector.test_squeeze ... ok
test_large_vector.test_broadcast_div ... ok
test_large_vector.test_Dense ... ok
test_large_vector.test_argsort ... ok
test_large_vector.test_sort ... ok
test_large_vector.test_topk ... ok
test_large_vector.test_shape ... ok
test_large_vector.test_size ... ok
test_large_vector.test_copy ... ok
test_large_vector.test_copy_to ... ok
test_large_vector.test_zeros_like ... ok
test_large_vector.test_ones_like ... ok
test_large_vector.test_concat ... ok
test_large_vector.test_sum ... ok
test_large_vector.test_prod ... ok
test_large_vector.test_min ... ok
test_large_vector.test_max ... ok
test_large_vector.test_argmax ... ok
test_large_vector.test_iadd ... ok
test_large_vector.test_isub ... ok
test_large_vector.test_imul ... ok
test_large_vector.test_idiv ... ok
test_large_vector.test_imod ... ok
test_large_vector.test_eq ... ok
test_large_vector.test_neq ... ok
test_large_vector.test_lt ... ok
test_large_vector.test_lte ... ok
test_large_vector.test_gt ... ok
test_large_vector.test_gte ... ok
test_large_vector.test_slice_like ... ok
test_large_vector.test_slice_axis ... ok
test_large_vector.test_full ... ok
test_large_vector.test_one_hot ... ok


Ran 46 tests in 16078.103s

OK

@access2rohit
Copy link
Contributor Author

@mxnet-label-bot add [pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Aug 21, 2019
@access2rohit access2rohit changed the title Adding more tests for Large Indices Added more tests for Large Indices Aug 27, 2019
@access2rohit access2rohit force-pushed the new_ops_large_vector branch 7 times, most recently from aa9146d to 0a05d15 Compare August 29, 2019 21:31
@@ -1208,9 +1208,9 @@ template<int req>
struct one_hot {
template<typename DType, typename IType>
MSHADOW_XINLINE static void Map(int i, DType* out, const IType* indices,
Copy link
Contributor

Choose a reason for hiding this comment

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

What about i?

@@ -170,6 +170,225 @@ def test_topk():
assert val.sum() == (LARGE_X - 1)


def test_shape():
b = create_vector(size=LARGE_X)
mx.nd.waitall()
Copy link
Contributor

Choose a reason for hiding this comment

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

#15941 review for wait all

@access2rohit
Copy link
Contributor Author

@mxnet-label-bot add [pr-awaiting-merge]

@marcoabreu marcoabreu added the pr-awaiting-merge Review and CI is complete. Ready to Merge label Aug 30, 2019
@apeforest apeforest merged commit d80510a into apache:master Aug 30, 2019
zixuanweeei pushed a commit to zixuanweeei/mxnet that referenced this pull request Sep 2, 2019
* Adding tests to verify support for Large Tensors in additional Ops along with new C_Apis supporting 64bit indexing

* removing skipped tests

* removing tests not required for vector testing

* Adding more tests for Large Indices and adding support for Large Indices in one_hot operator

* Re-Trigger build
access2rohit added a commit to access2rohit/incubator-mxnet that referenced this pull request Sep 25, 2019
* Adding tests to verify support for Large Tensors in additional Ops along with new C_Apis supporting 64bit indexing

* removing skipped tests

* removing tests not required for vector testing

* Adding more tests for Large Indices and adding support for Large Indices in one_hot operator

* Re-Trigger build
access2rohit added a commit to access2rohit/incubator-mxnet that referenced this pull request Sep 25, 2019
* Adding tests to verify support for Large Tensors in additional Ops along with new C_Apis supporting 64bit indexing

* removing skipped tests

* removing tests not required for vector testing

* Adding more tests for Large Indices and adding support for Large Indices in one_hot operator

* Re-Trigger build
access2rohit added a commit to access2rohit/incubator-mxnet that referenced this pull request Sep 25, 2019
* Adding tests to verify support for Large Tensors in additional Ops along with new C_Apis supporting 64bit indexing

* removing skipped tests

* removing tests not required for vector testing

* Adding more tests for Large Indices and adding support for Large Indices in one_hot operator

* Re-Trigger build
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-merge Review and CI is complete. Ready to Merge pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants