elvin-n commented on a change in pull request #8175:
URL: https://github.com/apache/tvm/pull/8175#discussion_r645060222
##########
File path: src/runtime/metal/metal_common.h
##########
@@ -42,9 +42,37 @@
#include "../workspace_pool.h"
+#define AUTORELEASEPOOL
tvm::runtime::metal::AutoReleasePoolWrapper::GetInstance() << [&]()
+
namespace tvm {
namespace runtime {
namespace metal {
+class AutoReleasePoolWrapper {
+ public:
+ static AutoReleasePoolWrapper& GetInstance() {
Review comment:
Not sure if this construction safe been used from several libraries.
Even if we do not have several modules, it's better to move body of the
function into cpp 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]