PR #24744: Don't clone instructions in HloEvaluator. #24967
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #24744: Don't clone instructions in HloEvaluator.
Imported from GitHub PR #24744
There doesn't appear to be any good reason to do this, but it makes
HloEvaluator very dangerous to use - any use from a multi-threaded
context will eventually cause memory corruptions due to concurrent
modifications of the HloModule. With this PR, it should be possible to
use multiple HloEvaluators concurrently.
Copybara import of the project:
--
f2ffe79 by Johannes Reifferscheid [email protected]:
Don't clone instructions in HloEvaluator.
There doesn't appear to be any good reason to do this, but it makes
HloEvaluator very dangerous to use.
--
a4f23ed by Johannes Reifferscheid [email protected]:
Fix layout issues inside fusions.
Previously, there was a workaround in the fusion handler to set missing
layouts to the default layout. This is needed because layout assignment
will usually clear internal layouts in fusions. Since we no longer have
a copy of the module, we cannot override the layouts - instead, we
support missing layouts where necessary.
Also add a test for a layout-less 2d reduction.
--
fb89439 by Johannes Reifferscheid [email protected]:
Fix handling tuple shapes with layouts.
--
a966d27 by Johannes Reifferscheid [email protected]:
Run clang-format.
--
5bb338b by Johannes Reifferscheid [email protected]:
Fix multiply-accumulate handler crashes.
--
f9204d6 by Johannes Reifferscheid [email protected]:
Undo CreateLiteral change.
This is unnecessary after
#25135.
--
5459e26 by Johannes Reifferscheid [email protected]:
Minor fixes.
--
2200224 by Johannes Reifferscheid [email protected]:
Fix convolution handling.
Turns out lhs_shape/rhs_shape aren't the same thing in HandleConvolution and
HandleConvolutionWithLiterals. Oops.
--
fe45167 by Johannes Reifferscheid [email protected]:
Fix default layout check.
Merging this change closes #24744
FUTURE_COPYBARA_INTEGRATE_REVIEW=#24744 from jreiffers:noclone fe45167