Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix][IR][ATTRS] Fix AttrEqual for Array and StrMap, double #5054

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Mar 12, 2020

  • Use fuzzy comparison for double.
  • Removed the hack for BatchNormAttrs and DictAttr.

Also removed a warning from text printer printing.

cc @MarisaKirisame @zhiics @merrymercy @jroesch @spectrometerHBH

@@ -54,6 +51,9 @@ TVM_REGISTER_OBJECT_TYPE(DocTextNode);
class DocText : public DocAtom {
public:
explicit DocText(std::string str) {
if (str.find_first_of("\t\n") != str.npos) {
LOG(WARNING) << "text node: '" << str << "' should not has tab or newline.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG(WARNING) << "text node: '" << str << "' should not has tab or newline.";
LOG(WARNING) << "text: '" << str << "' should not has tab or newline.";

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please fix CI.

src/ir/attrs.cc Outdated
@@ -344,6 +344,7 @@ bool DictAttrsNode::ContentEqual(const Object* other, AttrsEqual equal) const {
if (this == other) return true;
if (other == nullptr) return false;
if (this->type_index() != other->type_index()) return false;
LOG(INFO) << "Content equal ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this debugging stmt

- Use fuzzy comparison for double.
- Removed the hack for BatchNormAttrs and DictAttr.

Also removed a warning from text printer printing.
@tqchen tqchen merged commit 29a3d3a into apache:master Mar 12, 2020
@tqchen
Copy link
Member Author

tqchen commented Mar 12, 2020

Thanks @MarisaKirisame @zhiics

@tqchen tqchen deleted the attrs-fix branch March 16, 2020 16:20
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
…e#5054)

- Use fuzzy comparison for double.
- Removed the hack for BatchNormAttrs and DictAttr.

Also removed a warning from text printer printing.
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
…e#5054)

- Use fuzzy comparison for double.
- Removed the hack for BatchNormAttrs and DictAttr.

Also removed a warning from text printer printing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants