-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A couple of optimizer and rewriter extensions (#1937)
A few extensions motivated by ongoing transformer fusion optimizations: Pattern matching: * Extend pattern-matching pattern to allow specifying that extra-inputs are allowed. Optimizations: * Concat (x) can be replaced by Identity(x) * Redundant cast optimization was missing in core optimizer (though present as a llama rewrite rule). * Dropout optimizations moved into core optimizer (from rewrite rule; rewrite rule has an issue, use of attribute instead of input, and it seemed better to move it into core optimizer). In general, for optimizations involving a single node, the core optimizer is a better place (at least, as long as they are generic, and not backend-specific) than rewrite rules. It is more efficient. * Fix input/output size limit of constant-folding to be number of bytes. (It is currently inconsistent, as number of bytes for one and number of elements for another).
- Loading branch information
1 parent
edfa265
commit 32090a8
Showing
3 changed files
with
124 additions
and
17 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
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