-
Notifications
You must be signed in to change notification settings - Fork 79
Evaluate multiple ops together #1921
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
Changes from all commits
ac18d6a
7b6bf7b
84bfda1
d9023d5
c854075
09f21a8
32a2e88
ebb6a5e
f982f89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -524,6 +524,17 @@ class NVF_API Expr : public Statement { | |
| const ExpressionEvaluator& ee, | ||
| const std::vector<PolymorphicValue>& inputs) const; | ||
|
|
||
| // This version allows evaluation of multiple ops together instead of one op | ||
| // at a time by overriding and skipping computation of intermediate inputs | ||
| // that are not required. For example: | ||
| // 1. CatOp is internally preceded by PadOp but the ATen evaluation uses only | ||
| // the unpadded inputs and the evaluation of padded inputs can be skipped. | ||
| // 2. Evaluating patterns in matmul fallback such as MmaOp + Cast/ MmaOp + | ||
| // Bias + Cast | ||
| virtual std::vector<PolymorphicValue> evaluate( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be a code comment here about why this version of
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. Should be more clear now.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix the format of the comment? It shows some unnecessary indentation. |
||
| const ExpressionEvaluator& ee, | ||
| std::unordered_map<const Val*, PolymorphicValue>& known_values) const; | ||
|
|
||
| // Input/output accessors | ||
| const auto& inputs() const { | ||
| return inputs_; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.