ChaiBapchya commented on a change in pull request #16328: Fix large array tests
URL: https://github.com/apache/incubator-mxnet/pull/16328#discussion_r334181266
##########
File path: tests/python/unittest/common.py
##########
@@ -272,6 +272,27 @@ def teardown():
mx.nd.waitall()
+def with_post_test_cleanup():
+ """
+ Helper function that cleans up memory by releasing it from memory pool
+ Required especially by large tensor tests that have memory footprints in
GBs.
+ """
+ def test_helper(orig_test):
+ @make_decorator(orig_test)
+ def test_new(*args, **kwargs):
+ logger = default_logger()
+ try:
+ orig_test(*args, **kwargs)
+ except:
+ logger.info(test_msg)
+ raise
+ finally:
+ mx.nd.waitall()
+ mx.cpu().empty_cache()
Review comment:
Ya. We don't test for gpu (as large tensor GPU is not supported)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services