anirudh2290 commented on a change in pull request #14591: Reference engine from 
chunk via weak pointer
URL: https://github.com/apache/incubator-mxnet/pull/14591#discussion_r275998709
 
 

 ##########
 File path: tests/cpp/engine/threaded_engine_test.cc
 ##########
 @@ -122,6 +122,15 @@ double EvaluateWorloads(const std::vector<Workload>& 
workloads,
   return dmlc::GetTime() - t;
 }
 
+TEST(Engine, stop_cleanup) {
+    static std::unique_ptr<mxnet::NDArray> ndArray;
+    {
+        auto engine = mxnet::Engine::_GetSharedRef();
+        ndArray = std::make_unique<mxnet::NDArray>(mxnet::Context::CPU());
+        engine->Stop();
+    }
+}
+
 
 Review comment:
   @KellenSunderland Thanks for the nice work on the tests. I understand this 
may be difficult to test, and I am okay with the crash for verification. Would 
it be easy to pinpoint where it crashed when run with other tests ? Otherwise 
better to move it to a different source file.

----------------------------------------------------------------
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

Reply via email to