Integrate LLVM at llvm/llvm-project@e1669843f2
Updates LLVM usage to match [e1669843f2aa](https://github.com/llvm/llvm-project/commit/e1669843f2aa) PiperOrigin-RevId: 331987679 Change-Id: If78b52fe286b80f38d5fd933f6d457a679c43c80
This commit is contained in:
parent
d2856c2dd5
commit
61dcdcb2fc
@ -44,9 +44,15 @@ class HloClientDialect : public Dialect {
|
||||
static StringRef getDialectNamespace() { return "chlo"; }
|
||||
};
|
||||
|
||||
} // namespace chlo
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace chlo {
|
||||
|
||||
template <typename T>
|
||||
static Value getConstantLike(OpBuilder& b, Location loc, T constant,
|
||||
Value val) {
|
||||
|
@ -37,7 +37,7 @@ include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td"
|
||||
|
||||
def HLOClient_Dialect : Dialect {
|
||||
let name = "chlo";
|
||||
let cppNamespace = "chlo";
|
||||
let cppNamespace = "::mlir::chlo";
|
||||
let summary = [{
|
||||
Client HLO Ops
|
||||
}];
|
||||
|
@ -19,7 +19,6 @@ limitations under the License.
|
||||
#define TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_HLO_OPS_H_
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.h"
|
||||
#include "mlir/IR/Attributes.h"
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "mlir/IR/DialectImplementation.h"
|
||||
@ -32,11 +31,14 @@ limitations under the License.
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.h"
|
||||
#include "mlir/Interfaces/SideEffectInterfaces.h"
|
||||
|
||||
// clang-format off
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.h.inc"
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.h"
|
||||
// clang-format on
|
||||
|
||||
namespace mlir {
|
||||
class OpBuilder;
|
||||
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.h.inc"
|
||||
|
||||
namespace mhlo {
|
||||
|
||||
class MhloDialect : public Dialect {
|
||||
@ -77,10 +79,10 @@ LogicalResult deriveShapeFromFirstOperand(
|
||||
OpBuilder *builder, Operation *op,
|
||||
SmallVectorImpl<Value> *reifiedReturnShapes);
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h.inc"
|
||||
|
||||
} // end namespace mhlo
|
||||
} // end namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h.inc"
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_HLO_OPS_H_
|
||||
|
@ -27,7 +27,7 @@ include "mlir-hlo/Dialect/mhlo/IR/infer_fusibility_op_interface.td"
|
||||
|
||||
def HLO_Dialect : Dialect {
|
||||
let name = "mhlo";
|
||||
let cppNamespace = "mhlo";
|
||||
let cppNamespace = "::mlir::mhlo";
|
||||
}
|
||||
|
||||
class HLO_Op<string mnemonic, list<OpTrait> traits> :
|
||||
|
@ -33,9 +33,11 @@ limitations under the License.
|
||||
|
||||
namespace mlir {
|
||||
class OpBuilder;
|
||||
} // namespace mlir
|
||||
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.h.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace lmhlo {
|
||||
|
||||
class LmhloDialect : public Dialect {
|
||||
@ -44,10 +46,10 @@ class LmhloDialect : public Dialect {
|
||||
static StringRef getDialectNamespace() { return "lmhlo"; }
|
||||
};
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc"
|
||||
|
||||
} // namespace lmhlo
|
||||
} // end namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc"
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_HLO_INCLUDE_MLIR_HLO_DIALECT_MHLO_IR_LHLO_OPS_H_
|
||||
|
@ -41,7 +41,7 @@ include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_base.td"
|
||||
|
||||
def LHLO_Dialect : Dialect {
|
||||
let name = "lmhlo";
|
||||
let cppNamespace = "lmhlo";
|
||||
let cppNamespace = "::mlir::lmhlo";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -303,9 +303,15 @@ void ConstantLikeOp::getCanonicalizationPatterns(
|
||||
results.insert<ConstantLikeToConstant>(context);
|
||||
}
|
||||
|
||||
} // namespace chlo
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace chlo {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// chlo Dialect Constructor
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -60,7 +60,11 @@ limitations under the License.
|
||||
|
||||
namespace mlir {
|
||||
#include "hlo_patterns.cc.inc"
|
||||
} // namespace mlir
|
||||
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops_structs.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace mhlo {
|
||||
|
||||
Operation* MhloDialect::materializeConstant(OpBuilder& builder, Attribute value,
|
||||
@ -2469,9 +2473,15 @@ void CompareOp::build(OpBuilder& builder, OperationState& result, Value lhs,
|
||||
build(builder, result, new_type, lhs, rhs, comparison_direction);
|
||||
}
|
||||
|
||||
} // namespace mhlo
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace mhlo {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// mhlo Dialect Interfaces
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -29,6 +29,7 @@ limitations under the License.
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/FormatVariadic.h"
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h.inc"
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.cc.inc"
|
||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||
#include "mlir/IR/Attributes.h"
|
||||
#include "mlir/IR/Builders.h"
|
||||
@ -46,7 +47,6 @@ limitations under the License.
|
||||
#include "mlir/IR/Value.h"
|
||||
|
||||
namespace mlir {
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops_structs.cc.inc"
|
||||
namespace lmhlo {
|
||||
|
||||
LmhloDialect::LmhloDialect(MLIRContext *context)
|
||||
@ -159,9 +159,15 @@ static LogicalResult Verify(ReshapeMemRefCastOp op) {
|
||||
return success();
|
||||
}
|
||||
|
||||
} // namespace lmhlo
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace lmhlo {
|
||||
|
||||
// TODO(cheshire): Support folding, reuse code from hlo_ops.cc.
|
||||
|
||||
void FusionOp::build(OpBuilder &builder, OperationState &result,
|
||||
|
@ -513,7 +513,7 @@ static bool RuntimeVerifierWriterMain(raw_ostream &os, RecordKeeper &records) {
|
||||
continue;
|
||||
}
|
||||
if (trait.getDef().getValueAsString("trait") !=
|
||||
"OpTrait::TFLRuntimeOpTrait") {
|
||||
"::mlir::OpTrait::TFLRuntimeOpTrait") {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ limitations under the License.
|
||||
#include "mlir/Transforms/FoldUtils.h" // from @llvm-project
|
||||
#include "mlir/Transforms/InliningUtils.h" // from @llvm-project
|
||||
#include "mlir/Transforms/RegionUtils.h" // from @llvm-project
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_structs.cc.inc"
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
|
||||
|
||||
namespace mlir {
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_structs.cc.inc"
|
||||
namespace TFL {
|
||||
|
||||
// Returns true when the given operand arguments have the same shape or
|
||||
@ -2377,8 +2377,16 @@ LogicalResult WhileOp::moveOutOfLoop(llvm::ArrayRef<mlir::Operation *> ops) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops_interface.cc.inc"
|
||||
|
||||
} // namespace TFL
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace TFL {
|
||||
|
||||
#include "tensorflow/compiler/mlir/lite/runtime_verifiers.inc"
|
||||
|
||||
Operation *TensorFlowLiteDialect::materializeConstant(OpBuilder &builder,
|
||||
|
@ -30,11 +30,11 @@ limitations under the License.
|
||||
#include "mlir/Interfaces/LoopLikeInterface.h" // from @llvm-project
|
||||
#include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
|
||||
#include "mlir/Support/LLVM.h" // from @llvm-project
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_structs.h.inc"
|
||||
#include "tensorflow/compiler/mlir/lite/quantization/quantization_utils.h"
|
||||
#include "tensorflow/lite/schema/schema_generated.h"
|
||||
|
||||
namespace mlir {
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_structs.h.inc"
|
||||
namespace TFL {
|
||||
|
||||
class TensorFlowLiteDialect : public Dialect {
|
||||
@ -50,10 +50,11 @@ class TensorFlowLiteDialect : public Dialect {
|
||||
};
|
||||
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops_interface.h.inc"
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops.h.inc"
|
||||
|
||||
} // end namespace TFL
|
||||
} // end namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops.h.inc"
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_LITE_IR_TFL_OPS_H_
|
||||
|
@ -39,7 +39,7 @@ def TFL_Dialect : Dialect {
|
||||
represented using zero-dimensional tensors);
|
||||
}];
|
||||
|
||||
let cppNamespace = "TFL";
|
||||
let cppNamespace = "::mlir::TFL";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -55,7 +55,7 @@ static bool OpQuantSpecWriter(raw_ostream &os, RecordKeeper &records) {
|
||||
for (const auto t : op.getTraits()) {
|
||||
if (auto opTrait = llvm::dyn_cast<mlir::tblgen::NativeOpTrait>(&t)) {
|
||||
auto trait = opTrait->getTrait();
|
||||
if (!trait.consume_front("OpTrait::quant::")) continue;
|
||||
if (!trait.consume_front("::mlir::OpTrait::quant::")) continue;
|
||||
|
||||
OUT(2) << "if (auto tfl = llvm::dyn_cast<" << op.getQualCppClassName()
|
||||
<< ">(op)) {\n";
|
||||
@ -65,7 +65,7 @@ static bool OpQuantSpecWriter(raw_ostream &os, RecordKeeper &records) {
|
||||
OUT(4) << "for (int i = 0, e = op->getNumResults(); i != e; ++i)\n";
|
||||
OUT(6) << "spec->restricted_output_params[std::make_pair("
|
||||
<< matches[1] << ", " << matches[2]
|
||||
<< ")].push_back(tfl.OpTrait::quant::" << trait << "<"
|
||||
<< ")].push_back(tfl.::mlir::OpTrait::quant::" << trait << "<"
|
||||
<< op.getQualCppClassName()
|
||||
<< ">::GetResultQuantizedType(i));\n";
|
||||
matches.clear();
|
||||
|
@ -670,12 +670,12 @@ void LaunchOp::getCanonicalizationPatterns(OwningRewritePatternList& results,
|
||||
results.insert<DropEmptyLaunch>(context);
|
||||
}
|
||||
|
||||
} // namespace tf_device
|
||||
} // namespace mlir
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc.inc"
|
||||
|
||||
} // namespace tf_device
|
||||
} // namespace mlir
|
||||
|
@ -41,11 +41,11 @@ class TensorFlowDeviceDialect : public Dialect {
|
||||
explicit TensorFlowDeviceDialect(MLIRContext* context);
|
||||
};
|
||||
|
||||
} // namespace tf_device
|
||||
} // namespace mlir
|
||||
|
||||
// Declares the operations for this dialect using the generated header.
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_device.h.inc"
|
||||
|
||||
} // namespace tf_device
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TF_DEVICE_H_
|
||||
|
@ -36,7 +36,7 @@ def TfDevice_Dialect : Dialect {
|
||||
XlaRun.
|
||||
}];
|
||||
|
||||
let cppNamespace = "tf_device";
|
||||
let cppNamespace = "::mlir::tf_device";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -1121,12 +1121,12 @@ LogicalResult IslandOp::fold(llvm::ArrayRef<Attribute> operands,
|
||||
return success();
|
||||
}
|
||||
|
||||
} // namespace tf_executor
|
||||
} // namespace mlir
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc.inc"
|
||||
|
||||
} // namespace tf_executor
|
||||
} // namespace mlir
|
||||
|
@ -57,11 +57,11 @@ class TokenType : public Type::TypeBase<TokenType, Type, TypeStorage> {
|
||||
using Base::Base;
|
||||
};
|
||||
|
||||
} // namespace tf_executor
|
||||
} // namespace mlir
|
||||
|
||||
// Declares the operations for this dialect using the generated header.
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_executor.h.inc"
|
||||
|
||||
} // namespace tf_executor
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TF_EXECUTOR_H_
|
||||
|
@ -43,7 +43,7 @@ def TfExecutor_Dialect : Dialect {
|
||||
value).
|
||||
}];
|
||||
|
||||
let cppNamespace = "tf_executor";
|
||||
let cppNamespace = "::mlir::tf_executor";
|
||||
}
|
||||
|
||||
// Control type.
|
||||
|
@ -46,7 +46,7 @@ Invariants:
|
||||
TODO: Make invariants more structured so that we can reference them in ops.
|
||||
}];
|
||||
|
||||
let cppNamespace = "TF";
|
||||
let cppNamespace = "::mlir::TF";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -2294,12 +2294,12 @@ OpFoldResult MulOp::fold(ArrayRef<Attribute> operands) {
|
||||
return IdentityArithmeticOpFolder<MulOp>(*this, operands);
|
||||
}
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
@ -43,6 +43,9 @@ namespace TF {
|
||||
|
||||
class YieldOp;
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
// TODO(b/131258166): TensorFlow's mutex.h defines a `mutex_lock` macro, whose
|
||||
// purpose is to catch bug on `tensorflow::mutex_lock`. We don't use
|
||||
// `tensorflow::mutex_lock` here but we have ops (`tf.MutexLock` and
|
||||
@ -56,7 +59,4 @@ class YieldOp;
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.h.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TF_OPS_A_M_H_
|
||||
|
@ -2490,12 +2490,12 @@ void XdivyOp::getCanonicalizationPatterns(OwningRewritePatternList &results,
|
||||
results.insert<XdivyWithSqrtDivisor>(context);
|
||||
}
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
@ -38,15 +38,9 @@ limitations under the License.
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_verifiers.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
#define GET_OP_FWD_DEFINES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_all_ops.h.inc"
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.h.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TF_OPS_N_Z_H_
|
||||
|
@ -70,11 +70,12 @@ limitations under the License.
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
namespace {
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops_helpers.inc"
|
||||
#include "tensorflow/compiler/mlir/tensorflow/transforms/generated_canonicalize.inc"
|
||||
} // namespace
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
@ -82,6 +83,3 @@ namespace {
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_remaining_ops.cc.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
@ -36,15 +36,9 @@ limitations under the License.
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_verifiers.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
#define GET_OP_FWD_DEFINES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_all_ops.h.inc"
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_remaining_ops.h.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TF_REMAINING_OPS_H_
|
||||
|
@ -105,9 +105,15 @@ static LogicalResult Verify(SessionInitializerOp session_initializer) {
|
||||
return success();
|
||||
}
|
||||
|
||||
} // namespace tf_saved_model
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace tf_saved_model {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TensorFlowSavedModelDialect Dialect
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -40,10 +40,16 @@ class TensorFlowSavedModelDialect : public Dialect {
|
||||
static StringRef getDialectNamespace() { return "tf_saved_model"; }
|
||||
};
|
||||
|
||||
} // namespace tf_saved_model
|
||||
} // namespace mlir
|
||||
|
||||
// Declares the operations for this dialect using the generated header.
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.h.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace tf_saved_model {
|
||||
|
||||
// Returns the list of exported names for `op`.
|
||||
// An empty list means `op` is not exported.
|
||||
SmallVector<StringRef, 2> GetExportedNames(Operation *op);
|
||||
|
@ -82,7 +82,7 @@ def TfSavedModel_Dialect : Dialect {
|
||||
with "get_global @some_global_tensor" in the function body.
|
||||
}];
|
||||
|
||||
let cppNamespace = "tf_saved_model";
|
||||
let cppNamespace = "::mlir::tf_saved_model";
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,11 +15,9 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h"
|
||||
|
||||
namespace mlir {
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
void RuntimeDevices::AddDevice(const ParsedName& device) {
|
||||
|
@ -26,10 +26,9 @@ limitations under the License.
|
||||
#include "mlir/IR/Types.h" // from @llvm-project
|
||||
#include "tensorflow/core/util/device_name_utils.h"
|
||||
|
||||
namespace mlir {
|
||||
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
// Tensorflow devices available at runtime with corresponding metadata if it is
|
||||
|
@ -19,15 +19,9 @@ limitations under the License.
|
||||
#include "mlir/IR/TypeUtilities.h" // from @llvm-project
|
||||
#include "mlir/IR/Types.h" // from @llvm-project
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TableGen'd op method definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tfrt_ops.cc.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
@ -20,13 +20,7 @@ limitations under the License.
|
||||
#include "mlir/Interfaces/InferTypeOpInterface.h" // from @llvm-project
|
||||
#include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
|
||||
|
||||
namespace mlir {
|
||||
namespace TF {
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tensorflow/ir/tfrt_ops.h.inc"
|
||||
|
||||
} // namespace TF
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TENSORFLOW_IR_TFRT_OPS_H_
|
||||
|
@ -15,12 +15,12 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/compiler/mlir/tfjs/ir/tfjs_ops.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace tfjs {
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tfjs/ir/tfjs_ops.cc.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace tfjs {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// TFJSDialect
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -29,15 +29,9 @@ limitations under the License.
|
||||
#include "mlir/Interfaces/SideEffectInterfaces.h" // from @llvm-project
|
||||
#include "mlir/Support/LLVM.h" // from @llvm-project
|
||||
|
||||
namespace mlir {
|
||||
namespace tfjs {
|
||||
|
||||
#include "tensorflow/compiler/mlir/tfjs/ir/tfjs_dialect.h.inc"
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tfjs/ir/tfjs_ops.h.inc"
|
||||
|
||||
} // namespace tfjs
|
||||
} // namespace mlir
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TFJS_IR_TFJS_OPS_H_
|
||||
|
@ -39,7 +39,7 @@ def TFJSDialect : Dialect {
|
||||
TF graphs to be deployed on TFJS.
|
||||
}];
|
||||
|
||||
let cppNamespace = "tfjs";
|
||||
let cppNamespace = "::mlir::tfjs";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -77,9 +77,9 @@ LogicalResult Verify<AllocRawOp>(AllocRawOp op) {
|
||||
return success();
|
||||
}
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.cc.inc"
|
||||
|
||||
} // namespace tf_framework
|
||||
} // namespace kernel_gen
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.cc.inc"
|
||||
|
@ -38,12 +38,12 @@ class OpKernelContextType
|
||||
using Base::Base;
|
||||
};
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_dialect.h.inc"
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.h.inc"
|
||||
|
||||
} // namespace tf_framework
|
||||
} // namespace kernel_gen
|
||||
} // namespace mlir
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_dialect.h.inc"
|
||||
#include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.h.inc"
|
||||
|
||||
#endif // TENSORFLOW_COMPILER_MLIR_TOOLS_KERNEL_GEN_IR_TF_FRAMEWORK_OPS_H_
|
||||
|
@ -29,7 +29,7 @@ def TFFramework_Dialect : Dialect {
|
||||
This dialect contains operations and types for that correspond to
|
||||
TensorFlow C++ Framework.
|
||||
}];
|
||||
let cppNamespace = "kernel_gen::tf_framework";
|
||||
let cppNamespace = "::mlir::kernel_gen::tf_framework";
|
||||
}
|
||||
|
||||
def TFFramework_OpKernelContextType : DialectType<TFFramework_Dialect,
|
||||
|
@ -712,8 +712,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
)
|
||||
|
||||
# Check out LLVM and MLIR from llvm-project.
|
||||
LLVM_COMMIT = "7841e21c98495ba5e33e0d2507d985bd5b938445"
|
||||
LLVM_SHA256 = "372dfacb98f27b2a7f92a3aed22775b227a7761a853b34b2f626d3160622880c"
|
||||
LLVM_COMMIT = "e1669843f2aaf1e4929afdd8f125c14536d27664"
|
||||
LLVM_SHA256 = "03dd34e2d9e502f99aa7f5564b8c73d0d0dc67a8e794fb535c0ae1d223545627"
|
||||
LLVM_URLS = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
|
||||
"https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
|
||||
|
22
third_party/llvm/llvm.autogenerated.BUILD
vendored
22
third_party/llvm/llvm.autogenerated.BUILD
vendored
@ -2197,6 +2197,27 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "HelloNew",
|
||||
srcs = glob([
|
||||
"lib/Transforms/HelloNew/*.c",
|
||||
"lib/Transforms/HelloNew/*.cpp",
|
||||
"lib/Transforms/HelloNew/*.inc",
|
||||
"lib/Transforms/HelloNew/*.h",
|
||||
]),
|
||||
hdrs = glob([
|
||||
"include/llvm/Transforms/HelloNew/*.h",
|
||||
"include/llvm/Transforms/HelloNew/*.def",
|
||||
"include/llvm/Transforms/HelloNew/*.inc",
|
||||
]),
|
||||
copts = llvm_copts,
|
||||
deps = [
|
||||
":Core",
|
||||
":Support",
|
||||
":config",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "HexagonAsmParser",
|
||||
srcs = glob([
|
||||
@ -3343,6 +3364,7 @@ cc_library(
|
||||
":CodeGen",
|
||||
":Core",
|
||||
":Coroutines",
|
||||
":HelloNew",
|
||||
":IPO",
|
||||
":InstCombine",
|
||||
":Instrumentation",
|
||||
|
Loading…
x
Reference in New Issue
Block a user