PiperOrigin-RevId: 311914136
Change-Id: I8a04df09178d9dfce79c13c8d14daf4f69048dee
This commit is contained in:
A. Unique TensorFlower 2020-05-16 16:12:32 -07:00 committed by TensorFlower Gardener
parent 766f2968fc
commit bf639d750b
11 changed files with 15 additions and 19 deletions

View File

@ -27,7 +27,7 @@ limitations under the License.
#include "mlir/IR/StandardTypes.h" // from @llvm-project #include "mlir/IR/StandardTypes.h" // from @llvm-project
#include "mlir/Interfaces/DerivedAttributeOpInterface.h" // from @llvm-project #include "mlir/Interfaces/DerivedAttributeOpInterface.h" // from @llvm-project
#include "mlir/Interfaces/LoopLikeInterface.h" // from @llvm-project #include "mlir/Interfaces/LoopLikeInterface.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
#include "mlir/Support/LLVM.h" // from @llvm-project #include "mlir/Support/LLVM.h" // from @llvm-project
#include "tensorflow/compiler/mlir/lite/quantization/quantization_traits.h" #include "tensorflow/compiler/mlir/lite/quantization/quantization_traits.h"
#include "tensorflow/lite/schema/schema_generated.h" #include "tensorflow/lite/schema/schema_generated.h"

View File

@ -26,7 +26,7 @@ limitations under the License.
#include "mlir/IR/Dialect.h" // from @llvm-project #include "mlir/IR/Dialect.h" // from @llvm-project
#include "mlir/IR/OpDefinition.h" // from @llvm-project #include "mlir/IR/OpDefinition.h" // from @llvm-project
#include "mlir/IR/Types.h" // from @llvm-project #include "mlir/IR/Types.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
namespace mlir { namespace mlir {
namespace TFControlFlow { namespace TFControlFlow {

View File

@ -31,7 +31,7 @@ limitations under the License.
#include "mlir/Interfaces/CallInterfaces.h" // from @llvm-project #include "mlir/Interfaces/CallInterfaces.h" // from @llvm-project
#include "mlir/Interfaces/DerivedAttributeOpInterface.h" // from @llvm-project #include "mlir/Interfaces/DerivedAttributeOpInterface.h" // from @llvm-project
#include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project #include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_attributes.h" #include "tensorflow/compiler/mlir/tensorflow/ir/tf_attributes.h"
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h" #include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h"
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h" #include "tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h"

View File

@ -17,7 +17,7 @@ limitations under the License.
#include <algorithm> #include <algorithm>
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
#include "mlir/Support/LogicalResult.h" // from @llvm-project #include "mlir/Support/LogicalResult.h" // from @llvm-project
#include "tensorflow/c/eager/c_api.h" #include "tensorflow/c/eager/c_api.h"
#include "tensorflow/c/tf_status.h" #include "tensorflow/c/tf_status.h"

View File

@ -26,7 +26,7 @@ limitations under the License.
#include "mlir/IR/Dialect.h" // from @llvm-project #include "mlir/IR/Dialect.h" // from @llvm-project
#include "mlir/IR/OpImplementation.h" // from @llvm-project #include "mlir/IR/OpImplementation.h" // from @llvm-project
#include "mlir/IR/StandardTypes.h" // from @llvm-project #include "mlir/IR/StandardTypes.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
#include "mlir/Support/LLVM.h" // from @llvm-project #include "mlir/Support/LLVM.h" // from @llvm-project
namespace mlir { namespace mlir {

View File

@ -25,7 +25,7 @@ limitations under the License.
#include "mlir/IR/StandardTypes.h" // from @llvm-project #include "mlir/IR/StandardTypes.h" // from @llvm-project
#include "mlir/IR/Types.h" // from @llvm-project #include "mlir/IR/Types.h" // from @llvm-project
#include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project #include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
namespace mlir { namespace mlir {
namespace xla_chlo { namespace xla_chlo {

View File

@ -29,7 +29,7 @@ limitations under the License.
#include "mlir/IR/StandardTypes.h" // from @llvm-project #include "mlir/IR/StandardTypes.h" // from @llvm-project
#include "mlir/IR/Types.h" // from @llvm-project #include "mlir/IR/Types.h" // from @llvm-project
#include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project #include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
namespace mlir { namespace mlir {
class OpBuilder; class OpBuilder;

View File

@ -27,7 +27,7 @@ limitations under the License.
#include "mlir/IR/Operation.h" // from @llvm-project #include "mlir/IR/Operation.h" // from @llvm-project
#include "mlir/IR/StandardTypes.h" // from @llvm-project #include "mlir/IR/StandardTypes.h" // from @llvm-project
#include "mlir/IR/Types.h" // from @llvm-project #include "mlir/IR/Types.h" // from @llvm-project
#include "mlir/Interfaces/SideEffects.h" // from @llvm-project #include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
namespace mlir { namespace mlir {
class OpBuilder; class OpBuilder;

View File

@ -2875,9 +2875,8 @@ Status IrEmitter::HandleRngGetAndUpdateState(HloInstruction* rng_state) {
old_state->getType()->getScalarType(), old_state->getType()->getScalarType(),
address->getType()->getPointerAddressSpace())); address->getType()->getPointerAddressSpace()));
llvm::StoreInst* store = Store(old_state, address); llvm::StoreInst* store = Store(old_state, address);
store->setAlignment( store->setAlignment(llvm::Align(IrEmitter::MinimumAlignmentForPrimitiveType(
llvm::MaybeAlign(IrEmitter::MinimumAlignmentForPrimitiveType( rng_state->shape().element_type())));
rng_state->shape().element_type())));
return Status::OK(); return Status::OK();
} }

View File

@ -222,7 +222,7 @@ bool IrEmitter::MaybeEmitDirectAtomicOperation(
// Derive a minimum alignment from the type. The optimizer can increase it // Derive a minimum alignment from the type. The optimizer can increase it
// later. // later.
store->setAlignment( store->setAlignment(
llvm::MaybeAlign(ShapeUtil::ByteSizeOfPrimitiveType(element_type))); llvm::Align(ShapeUtil::ByteSizeOfPrimitiveType(element_type)));
return true; return true;
} }

View File

@ -788,9 +788,6 @@ cc_library(
"lib/Support/*.h", "lib/Support/*.h",
], ],
exclude = [ exclude = [
# TODO(herhut): Move JitRunner out of Support so that Support does not
# depend on dialect.
"lib/Support/JitRunner.cpp",
# TODO(jpienaar): Move this out, else Support depends on Analysis/ # TODO(jpienaar): Move this out, else Support depends on Analysis/
"lib/Support/MlirOptMain.cpp", "lib/Support/MlirOptMain.cpp",
], ],
@ -2232,10 +2229,10 @@ gentbl(
cc_library( cc_library(
name = "SideEffects", name = "SideEffects",
srcs = [ srcs = [
"lib/Interfaces/SideEffects.cpp", "lib/Interfaces/SideEffectInterfaces.cpp",
], ],
hdrs = [ hdrs = [
"include/mlir/Interfaces/SideEffects.h", "include/mlir/Interfaces/SideEffectInterfaces.h",
], ],
includes = ["include"], includes = ["include"],
deps = [ deps = [
@ -2621,8 +2618,8 @@ cc_binary(
cc_library( cc_library(
name = "MlirJitRunner", name = "MlirJitRunner",
srcs = ["lib/Support/JitRunner.cpp"], srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
hdrs = ["include/mlir/Support/JitRunner.h"], hdrs = ["include/mlir/ExecutionEngine/JitRunner.h"],
includes = ["include"], includes = ["include"],
deps = [ deps = [
":AllPassesAndDialectsNoRegistration", ":AllPassesAndDialectsNoRegistration",