Skip to content

Commit e2c99a8

Browse files
authored
[Fix] Keep update-to-date with upstream API change (mlc-ai#1209)
1 parent a7f1183 commit e2c99a8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cpp/image_embed.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include "image_embed.h"
1010

1111
#include <picojson.h>
12+
#include <tvm/runtime/memory/memory_manager.h>
1213
#include <tvm/runtime/module.h>
1314
#include <tvm/runtime/ndarray.h>
1415
#include <tvm/runtime/registry.h>
15-
#include <tvm/runtime/relax_vm/memory_manager.h>
1616

1717
#include <cctype>
1818
#include <chrono>
@@ -59,9 +59,9 @@ class LLMImage {
5959
ICHECK(fload_exec.defined()) << "TVM runtime cannot find vm_load_executable";
6060
vm_ = fload_exec();
6161
vm_->GetFunction("vm_initialization")(static_cast<int>(device_.device_type), device_.device_id,
62-
static_cast<int>(relax_vm::AllocatorType::kPooled),
62+
static_cast<int>(memory::AllocatorType::kPooled),
6363
static_cast<int>(kDLCPU), 0,
64-
static_cast<int>(relax_vm::AllocatorType::kPooled));
64+
static_cast<int>(memory::AllocatorType::kPooled));
6565

6666
embed_func_ = vm_->GetFunction("embed");
6767

cpp/llm_chat.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
#include <tokenizers_cpp.h>
1313
#include <tvm/runtime/c_runtime_api.h>
1414
#include <tvm/runtime/disco/session.h>
15+
#include <tvm/runtime/memory/memory_manager.h>
1516
#include <tvm/runtime/module.h>
1617
#include <tvm/runtime/ndarray.h>
1718
#include <tvm/runtime/packed_func.h>
1819
#include <tvm/runtime/registry.h>
19-
#include <tvm/runtime/relax_vm/memory_manager.h>
2020

2121
#include <cctype>
2222
#include <chrono>
@@ -159,8 +159,8 @@ struct FunctionTable {
159159
this->local_vm = fload_exec();
160160
this->local_vm->GetFunction("vm_initialization")(
161161
static_cast<int>(device.device_type), device.device_id,
162-
static_cast<int>(relax_vm::AllocatorType::kPooled), static_cast<int>(kDLCPU), 0,
163-
static_cast<int>(relax_vm::AllocatorType::kPooled));
162+
static_cast<int>(memory::AllocatorType::kPooled), static_cast<int>(kDLCPU), 0,
163+
static_cast<int>(memory::AllocatorType::kPooled));
164164
this->mod_get_func = [this](const std::string& name) -> PackedFunc {
165165
PackedFunc func = this->local_vm->GetFunction(name, false);
166166
return func;

0 commit comments

Comments
 (0)