reminisce commented on a change in pull request #17510: MXNet FFI for Operator 
Imperative Invocation
URL: https://github.com/apache/incubator-mxnet/pull/17510#discussion_r380888852
 
 

 ##########
 File path: include/mxnet/runtime/object.h
 ##########
 @@ -0,0 +1,823 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*!
+ * \file object.h
+ * \brief Adapted from incubator-tvm/include/tvm/runtime/object.h
+ * A managed object in MXNet runtime.
+ */
+#ifndef MXNET_RUNTIME_OBJECT_H_
+#define MXNET_RUNTIME_OBJECT_H_
+
+#include <dmlc/logging.h>
+#include <type_traits>
+#include <string>
+#include <utility>
+#include "c_runtime_api.h"
+
+/*!
+ * \brief Whether or not use atomic reference counter.
+ *  If the reference counter is not atomic,
+ *  an object cannot be owned by multiple threads.
+ *  We can, however, move an object across threads
+ */
+#ifndef MXNET_OBJECT_ATOMIC_REF_COUNTER
+#define MXNET_OBJECT_ATOMIC_REF_COUNTER 1
+#endif
+
+#if MXNET_OBJECT_ATOMIC_REF_COUNTER
+#include <atomic>
+#endif  // MXNET_OBJECT_ATOMIC_REF_COUNTER
+
+namespace mxnet {
+namespace runtime {
+
+/*! \brief list of the type index. */
+enum TypeIndex  {
+  /*! \brief Root object type. */
+  kRoot = 0,
+  kVMTensor = 1,
 
 Review comment:
   Should these `VMXXX` be `MXNetXXX`?

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