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

 ##########
 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:
   It would be a little difficult in fact.  Let's move it to it's own test 
suite to hopefully make it a little more obvious for future contributors.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to