Skip to content

[Bug] InternalError: Check failed: (export_dso) is false: export_dso should be enabled for DSOExportable modules #883

@Matthieu-Tinycoaching

Description

@Matthieu-Tinycoaching

Hello,

While running the tutorial_extensions_to_more_model_variants.ipynb notebook on google colab:
lib_path, model_path, chat_config_path = mlc_llm.build_model(build_args)

I got the following error message:

Weights exist at dist/models/vicuna-7b-v1.5, skipping download.
Using path "dist/models/vicuna-7b-v1.5" for model "vicuna-7b-v1.5"
Target configured: cuda -keys=cuda,gpu -arch=sm_75 -max_num_threads=1024 -max_shared_memory_per_block=49152 -max_threads_per_block=1024 -registers_per_block=65536 -thread_warp_size=32
Automatically using target for weight quantization: cuda -keys=cuda,gpu -arch=sm_75 -max_num_threads=1024 -max_shared_memory_per_block=49152 -max_threads_per_block=1024 -registers_per_block=65536 -thread_warp_size=32
Start computing and quantizing weights... This may take a while.
Finish computing and quantizing weights.
Total param size: 3.5313796997070312 GB
Start storing to cache dist/vicuna-7b-v1.5-q4f16_1/params
[0327/0327] saving param_326
All finished, 115 total shards committed, record saved to dist/vicuna-7b-v1.5-q4f16_1/params/ndarray-cache.json
Finish exporting chat config to dist/vicuna-7b-v1.5-q4f16_1/params/mlc-chat-config.json
---------------------------------------------------------------------------
InternalError                             Traceback (most recent call last)
[<ipython-input-9-b2f1f1fc4927>](https://localhost:8080/#) in <cell line: 1>()
----> 1 lib_path, model_path, chat_config_path = mlc_llm.build_model(build_args)

4 frames
[/usr/local/lib/python3.11/site-packages/tvm/_ffi/_ctypes/packed_func.py](https://localhost:8080/#) in __call__(self, *args)
    236             != 0
    237         ):
--> 238             raise get_last_ffi_error()
    239         _ = temp_args
    240         _ = args

InternalError: Traceback (most recent call last):
  9: TVMFuncCall
  8: _ZN3tvm7runtime13PackedFun
  7: tvm::runtime::TypedPackedFunc<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (tvm::runtime::ObjectRef const&)>::AssignTypedLambda<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(tvm::runtime::ObjectRef const&)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(tvm::runtime::ObjectRef const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const
  6: tvm::SaveJSON[abi:cxx11](tvm::runtime::ObjectRef const&)
  5: tvm::JSONGraph::Create(tvm::runtime::ObjectRef const&)
  4: tvm::JSONAttrGetter::Get(tvm::runtime::Object*)
  3: tvm::__make_reflection4::{lambda(tvm::runtime::Object const*)#2}::_FUN(tvm::runtime::Object const)
  2: tvm::codegen::SerializeModuleToBytes[abi:cxx11](tvm::runtime::Module const&, bool)
  1: tvm::codegen::ModuleSerializer::SerializeModuleToBytes(dmlc::Stream*, bool)
  0: _ZN3tvm7runtime6deta
  File "/workspace/tvm/src/target/codegen.cc", line 87
InternalError: Check failed: (export_dso) is false: `export_dso` should be enabled for DSOExportable modules

Does anyone know how to deal with it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions