diff --git a/include/tvm/runtime/module.h b/include/tvm/runtime/module.h index e52acf60a28d..b629e6176498 100644 --- a/include/tvm/runtime/module.h +++ b/include/tvm/runtime/module.h @@ -223,7 +223,7 @@ class TVM_DLL ModuleNode : public Object { virtual int GetProperty() const { return 0b000; } /*! \brief Returns true if this module is 'DSO exportable'. */ - bool IsDSOExportable() const { return GetProperty() == ModulePropertyMask::kDSOExportable; }; + bool IsDSOExportable() const { return GetProperty() & ModulePropertyMask::kDSOExportable; }; /*! * \brief Returns true if this module has a definition for a function of \p name. If diff --git a/src/target/llvm/llvm_module.cc b/src/target/llvm/llvm_module.cc index bf03556d57e0..367989dc53d8 100644 --- a/src/target/llvm/llvm_module.cc +++ b/src/target/llvm/llvm_module.cc @@ -92,11 +92,13 @@ class LLVMModuleNode final : public runtime::ModuleNode { const char* type_key() const final { return "llvm"; } PackedFunc GetFunction(const std::string& name, const ObjectPtr& sptr_to_self) final; + /*! \brief Get the property of the runtime module .*/ + // TODO(tvm-team): Make it serializable int GetProperty() const { - return runtime::ModulePropertyMask::kBinarySerializable | - runtime::ModulePropertyMask::kRunnable | runtime::ModulePropertyMask::kDSOExportable; + return runtime::ModulePropertyMask::kRunnable | runtime::ModulePropertyMask::kDSOExportable; }; + void SaveToFile(const std::string& file_name, const std::string& format) final; void SaveToBinary(dmlc::Stream* stream) final; std::string GetSource(const std::string& format) final;