1818 */
1919
2020/* !
21- * \file tvm/runtime/vm/ memory_manager.h
21+ * \file tvm/runtime/memory_manager.h
2222 * \brief Abstract device memory management API
2323 */
24- #ifndef TVM_RUNTIME_VM_MEMORY_MANAGER_H_
25- #define TVM_RUNTIME_VM_MEMORY_MANAGER_H_
24+ #ifndef TVM_RUNTIME_MEMORY_MANAGER_H_
25+ #define TVM_RUNTIME_MEMORY_MANAGER_H_
2626
2727#include < tvm/runtime/c_runtime_api.h>
2828#include < tvm/runtime/ndarray.h>
3636
3737namespace tvm {
3838namespace runtime {
39- namespace vm {
4039
4140struct Buffer {
4241 /* ! \brief The pointer to the allocated block of memory. */
@@ -60,9 +59,11 @@ class Allocator {
6059 * \param shape The shape of the NDArray.
6160 * \param dtype The datatype of the NDArray.
6261 * \param dev The device where the array is allocated.
62+ * \param mem_scope optional memory scope
6363 * \return The empty NDArray.
6464 */
65- NDArray Empty (std::vector<int64_t > shape, DLDataType dtype, Device dev);
65+ NDArray Empty (std::vector<int64_t > shape, DLDataType dtype, Device dev,
66+ Optional<String> mem_scope = NullOpt);
6667 /* ! \brief Return the allocator type. */
6768 inline AllocatorType type () const { return type_; }
6869 /* ! \brief Allocate a buffer given a size, alignment and type.
@@ -140,8 +141,7 @@ class Storage : public ObjectRef {
140141 TVM_DEFINE_MUTABLE_OBJECT_REF_METHODS (Storage, ObjectRef, StorageObj);
141142};
142143
143- } // namespace vm
144144} // namespace runtime
145145} // namespace tvm
146146
147- #endif // TVM_RUNTIME_VM_MEMORY_MANAGER_H_
147+ #endif // TVM_RUNTIME_MEMORY_MANAGER_H_
0 commit comments