-
Notifications
You must be signed in to change notification settings - Fork 74k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XLA:GPU] Remove the
emit_param_load_fn
callback in EmitTiledScope
.
PiperOrigin-RevId: 612955251
- Loading branch information
1 parent
04a2e22
commit 7ac685e
Showing
22 changed files
with
352 additions
and
436 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
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
63 changes: 63 additions & 0 deletions
63
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla_passes.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
==============================================================================*/ | ||
|
||
#ifndef TENSORFLOW_COMPILER_MLIR_TF2XLA_TRANSFORMS_LEGALIZE_TF_WITH_TF2XLA_PASSES_H_ | ||
#define TENSORFLOW_COMPILER_MLIR_TF2XLA_TRANSFORMS_LEGALIZE_TF_WITH_TF2XLA_PASSES_H_ | ||
|
||
#include <memory> | ||
#include <optional> | ||
|
||
#include "llvm/ADT/StringRef.h" | ||
#include "mlir/IR/MLIRContext.h" // from @llvm-project | ||
#include "mlir/IR/PatternMatch.h" // from @llvm-project | ||
#include "mlir/Pass/Pass.h" // from @llvm-project | ||
#include "mlir/Pass/PassRegistry.h" // from @llvm-project | ||
#include "mlir/Support/LogicalResult.h" // from @llvm-project | ||
#include "mlir/Transforms/DialectConversion.h" // from @llvm-project | ||
|
||
namespace mlir { | ||
|
||
namespace func { | ||
class FuncOp; | ||
} | ||
class ModuleOp; | ||
class Operation; | ||
template <typename T> | ||
class OperationPass; | ||
class Pass; | ||
|
||
namespace mhlo { | ||
|
||
/// Converter to be used along with the fallback Tf2Xla patterns below. | ||
class Tf2XlaTypeConverter : public TypeConverter { | ||
public: | ||
Tf2XlaTypeConverter(); | ||
}; | ||
|
||
/// Adds the TF to XLA via TF2XLA rewrite patterns to the pattern list. | ||
/// `prefer_tf2xla` means an op will be included iff it is not in | ||
/// `MlirLegalizedUnderPreferTf2XlaSet`. `!prefer_tf2xla` mean an op will be | ||
/// included if there is no native MLIR legalization for the op. | ||
void PopulateLegalizeTfWithTf2XlaPatterns(llvm::StringRef device_type, | ||
RewritePatternSet& patterns, | ||
MLIRContext* ctx, | ||
Tf2XlaTypeConverter& converter, | ||
bool prefer_tf2xla = false); | ||
|
||
|
||
} // namespace mhlo | ||
} // namespace mlir | ||
|
||
#endif // TENSORFLOW_COMPILER_MLIR_TF2XLA_TRANSFORMS_LEGALIZE_TF_WITH_TF2XLA_PASSES_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.