Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/tvm/node/structural_equal.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ class StructuralEqual : public BaseValueEqual {
* \brief Compare objects via strutural equal.
* \param lhs The left operand.
* \param rhs The right operand.
* \param map_free_params Whether or not to map free variables.
* \return The comparison result.
*/
TVM_DLL bool operator()(const ObjectRef& lhs, const ObjectRef& rhs) const;
TVM_DLL bool operator()(const ObjectRef& lhs, const ObjectRef& rhs,
const bool map_free_params = false) const;
};

/*!
Expand Down
5 changes: 3 additions & 2 deletions src/node/structural_equal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,9 @@ TVM_REGISTER_GLOBAL("node.GetFirstStructuralMismatch")
return first_mismatch;
});

bool StructuralEqual::operator()(const ObjectRef& lhs, const ObjectRef& rhs) const {
return SEqualHandlerDefault(false, nullptr, false).Equal(lhs, rhs, false);
bool StructuralEqual::operator()(const ObjectRef& lhs, const ObjectRef& rhs,
bool map_free_params) const {
return SEqualHandlerDefault(false, nullptr, false).Equal(lhs, rhs, map_free_params);
}

bool NDArrayEqual(const runtime::NDArray::Container* lhs, const runtime::NDArray::Container* rhs,
Expand Down