-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir] Implement a memory-space cast bubbling-down transform #159454
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a15b8ca
[mlir] Implement memory-space cast operand fusion into consumers
fabianmcg 3709f67
address comments 1/2
fabianmcg 4789d11
address comements 2/2
fabianmcg 7a881b6
Update mlir/include/mlir/Interfaces/MemOpInterfaces.td
fabianmcg 7f4a7f9
fix benefit
fabianmcg 150b791
Update mlir/include/mlir/Interfaces/MemOpInterfaces.td
fabianmcg 231ae13
fix build
fabianmcg 1321454
rename isLosslesscast method
fabianmcg d753be0
use std::optional in bubbleDownCasts
fabianmcg e70b0f2
improve docs
fabianmcg 2e5ff23
address reviewer comments
fabianmcg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
//===- MemOpInterfaces.h - Memory operation interfaces ----------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file contains declarations of interfaces for operations that interact | ||
// with memory. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef MLIR_INTERFACES_MEMOPINTERFACES_H | ||
#define MLIR_INTERFACES_MEMOPINTERFACES_H | ||
|
||
#include "mlir/IR/OpDefinition.h" | ||
|
||
namespace mlir { | ||
namespace detail { | ||
/// Attempt to verify the given memory space cast operation. | ||
LogicalResult verifyMemorySpaceCastOpInterface(Operation *op); | ||
|
||
/// Tries to bubble-down inplace a `MemorySpaceCastOpInterface` operation | ||
/// referenced by `operand`. On success, it returns `std::nullopt`. It | ||
/// returns failure if `operand` doesn't reference a | ||
/// `MemorySpaceCastOpInterface` op. | ||
FailureOr<std::optional<SmallVector<Value>>> | ||
bubbleDownInPlaceMemorySpaceCastImpl(OpOperand &operand, ValueRange results); | ||
} // namespace detail | ||
} // namespace mlir | ||
|
||
/// Include the generated interface declarations. | ||
#include "mlir/Interfaces/MemOpInterfaces.h.inc" | ||
|
||
#endif // MLIR_INTERFACES_MEMOPINTERFACES_H |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.