Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunggg committed Mar 27, 2023
1 parent 44a9057 commit 4594ce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/tvm/runtime/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/target/llvm/llvm_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>& 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;
Expand Down

0 comments on commit 4594ce4

Please sign in to comment.