forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add implementation of alpha equivalence (apache#35)
* Refactor base types to reuse HalideIR::Type * Tweak BaseType constructors * Add start on alpha_eq for expressions * Fix free_vars.h * Add alpha_eq implementation and tests * Restore reverse_ad * Add test skeleton * Refactor type_visitor.h * Update free_type_vars.cc * Stub type alpha-equivalence * Fix style in AlphaEq * Fill in unfinished test cases * Get half of the tests passing * More changes, only 13 failures left * Fix a few more bugs * Fix Tensor and Product cases * Fix cast case * Fix test cases * Fix lint * Fix remaining test cases
- Loading branch information
Showing
20 changed files
with
601 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*! | ||
* Copyright (c) 2018 by Contributors | ||
* \file alpha_eq.h | ||
* \brief Check expressions for structural equivalence. | ||
*/ | ||
#ifndef NNVM_RELAY_ALPHA_EQ_H_ | ||
#define NNVM_RELAY_ALPHA_EQ_H_ | ||
|
||
#include "node.h" | ||
|
||
namespace nnvm { | ||
namespace relay { | ||
|
||
bool alpha_eq(const Expr & e1, const Expr & e2); | ||
bool alpha_eq(const Type & t1, const Type & t2); | ||
|
||
} // namespace relay | ||
} // namespace nnvm | ||
#endif // NNVM_RELAY_ALPHA_EQ_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.