Home
last modified time | relevance | path

Searched refs:mlir (Results 1 – 25 of 513) sorted by relevance

12345678910>>...21

/external/tensorflow/tensorflow/compiler/xla/service/mlir_gpu/
Dkernel_lowering.cc55 using ::mlir::xla_lhlo::FusionOp;
64 : public mlir::FunctionPass<FusionToLhloConverter> {
67 mlir::OwningRewritePatternList patterns; in runOnFunction()
68 mlir::ConversionTarget target(ctx); in runOnFunction()
69 target.addLegalDialect<::mlir::xla_lhlo::XlaLhloDialect>(); in runOnFunction()
70 ::mlir::xla_hlo::populateHLOToLHLOConversionPattern(&ctx, &patterns); in runOnFunction()
77 getFunction().walk([&](mlir::xla_lhlo::ReduceOp op) { in runOnFunction()
86 struct FusionOpRemover : public mlir::FunctionPass<FusionOpRemover> {
89 mlir::OpBuilder builder(op); in runOnFunction()
92 mlir::BlockAndValueMapping mapping; in runOnFunction()
[all …]
DBUILD40 "@llvm-project//mlir:IR",
49 "@llvm-project//mlir:Pass",
50 "@llvm-project//mlir:StandardOps",
84 "@llvm-project//mlir:GPUDialect",
85 "@llvm-project//mlir:IR",
86 "@llvm-project//mlir:LLVMDialect",
87 "@llvm-project//mlir:StandardOps",
88 "@llvm-project//mlir:Support",
89 "@llvm-project//mlir:TargetNVVMIR",
100 "//tensorflow/compiler/mlir/xla:hlo",
[all …]
Dmlir_compiler.cc63 using ::mlir::BlockArgument;
64 using ::mlir::dyn_cast;
65 using ::mlir::FuncOp;
66 using ::mlir::MLIRContext;
67 using ::mlir::ModuleOp;
68 using ::mlir::OwningModuleRef;
69 using ::mlir::UnknownLoc;
70 using ::mlir::Value;
71 using ::mlir::gpu::LaunchFuncOp;
72 using ::mlir::LLVM::LLVMDialect;
[all …]
/external/tensorflow/tensorflow/compiler/mlir/
DBUILD9 "@llvm-project//mlir:friends",
16 packages = ["//tensorflow/compiler/mlir/..."],
34 "@llvm-project//mlir:IR",
47 "@llvm-project//mlir:AffineDialectRegistration",
48 "@llvm-project//mlir:LoopDialectRegistration",
49 "@llvm-project//mlir:MlirOptLib",
50 "@llvm-project//mlir:Pass",
51 "@llvm-project//mlir:QuantOpsDialectRegistration",
52 "@llvm-project//mlir:Support",
53 "@llvm-project//mlir/test:TestTransforms",
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/mlir_gpu/experimental/conv_emitter/
Dconv_emitter.cc56 mlir::AffineMap affine_map;
58 mlir::Type element_type;
64 mlir::Builder builder) { in GetShapeInfo()
87 std::vector<mlir::AffineExpr> affine_exprs; in GetShapeInfo()
94 shape_info.affine_map = mlir::AffineMap::get( in GetShapeInfo()
112 bool IsSimpleLoop(mlir::AffineForOp loop) { in IsSimpleLoop()
120 mlir::AffineMap affine_map;
121 std::vector<mlir::Value> operands;
124 BoundAffineMap GetBoundAffineMapFrom(mlir::Operation* op) { in GetBoundAffineMapFrom()
125 if (auto load = mlir::dyn_cast<mlir::AffineLoadOp>(op)) { in GetBoundAffineMapFrom()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/
DBUILD3 "//third_party/mlir:tblgen.bzl",
18 includes = ["//third_party/mlir:subpackages"],
20 "//learning/brain/experimental/mlir/...",
22 "//tensorflow/compiler/mlir/...",
31 "//tensorflow/compiler/mlir/lite/quantization:quantization_td_files",
32 "@llvm-project//mlir:OpBaseTdFiles",
33 "@llvm-project//mlir:include/mlir/Transforms/LoopLikeInterface.td",
53 tblgen = "@llvm-project//mlir:mlir-tblgen",
72 tblgen = "@llvm-project//mlir:mlir-tblgen",
87 tblgen = "@llvm-project//mlir:mlir-tblgen",
[all …]
Dtf_tfl_passes.cc30 namespace mlir { namespace
38 void AddQuantizationPasses(const mlir::TFL::QuantizationSpecs& quant_specs, in AddQuantizationPasses()
39 mlir::OpPassManager* pass_manager) { in AddQuantizationPasses()
40 pass_manager->addPass(mlir::TFL::CreatePrepareQuantizePass(quant_specs)); in AddQuantizationPasses()
41 pass_manager->addPass(mlir::TFL::CreateQuantizePass()); in AddQuantizationPasses()
45 mlir::TFL::CreatePostQuantizePass(emit_quant_adaptor_ops)); in AddQuantizationPasses()
49 pass_manager->addPass(mlir::TFL::CreateDefaultQuantParamsPass( in AddQuantizationPasses()
52 pass_manager->addPass(mlir::TFL::CreateQuantizePass()); in AddQuantizationPasses()
54 mlir::TFL::CreatePostQuantizePass(emit_quant_adaptor_ops)); in AddQuantizationPasses()
58 void AddTFToTFLConversionPasses(const mlir::TFL::PassConfig& pass_config, in AddTFToTFLConversionPasses()
[all …]
Dflatbuffer_operator.cc40 StatusOr<mlir::StringAttr> GetPaddingAttr(TfLitePadding pad_params, in GetPaddingAttr()
41 mlir::Builder builder, in GetPaddingAttr()
42 mlir::Location loc) { in GetPaddingAttr()
97 mlir::Type type, flatbuffers::FlatBufferBuilder* builder) { in ConvertDerivedTypeAttrForOptionWriter()
99 case mlir::StandardTypes::F16: in ConvertDerivedTypeAttrForOptionWriter()
101 case mlir::StandardTypes::F32: in ConvertDerivedTypeAttrForOptionWriter()
103 case mlir::TF::TensorFlowTypes::STRING: in ConvertDerivedTypeAttrForOptionWriter()
105 case mlir::StandardTypes::Complex: { in ConvertDerivedTypeAttrForOptionWriter()
106 auto etype = type.cast<mlir::ComplexType>().getElementType(); in ConvertDerivedTypeAttrForOptionWriter()
112 case mlir::StandardTypes::Integer: { in ConvertDerivedTypeAttrForOptionWriter()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/xla/
DBUILD1 load("//third_party/mlir:tblgen.bzl", "gentbl")
11 includes = ["//third_party/mlir:subpackages"],
14 "//learning/brain/experimental/mlir/...",
18 "//tensorflow/compiler/mlir/...",
35 "@llvm-project//mlir:OpBaseTdFiles",
47 tblgen = "@llvm-project//mlir:mlir-tblgen",
59 tblgen = "@llvm-project//mlir:mlir-tblgen",
70 tblgen = "@llvm-project//mlir:mlir-tblgen",
80 tblgen = "@llvm-project//mlir:mlir-tblgen",
85 "@llvm-project//mlir:StdOpsTdFiles",
[all …]
Dhlo_function_importer.h44 static StatusOr<mlir::FuncOp> ImportFunction(
45 mlir::ModuleOp module, mlir::Builder* builder,
46 std::unordered_map<xla::HloComputation*, mlir::FuncOp>* function_map,
51 mlir::ModuleOp module, mlir::Builder* builder, in HloFunctionImporter()
52 std::unordered_map<xla::HloComputation*, mlir::FuncOp>* function_map) in HloFunctionImporter()
58 StatusOr<mlir::FuncOp> ImportFunction(xla::HloComputation* computation);
62 mlir::Region* region);
67 mlir::Block* block);
70 StatusOr<mlir::Operation*> ImportInstruction(xla::HloInstruction* instruction,
71 mlir::OpBuilder* func_builder);
[all …]
Dtype_to_shape.cc34 using mlir::IntegerType;
35 using mlir::MemRefType;
36 using mlir::RankedTensorType;
37 using mlir::VectorType;
44 PrimitiveType TypeToPrimitiveType(mlir::Type type) { in TypeToPrimitiveType()
46 case mlir::StandardTypes::BF16: in TypeToPrimitiveType()
48 case mlir::StandardTypes::F16: in TypeToPrimitiveType()
50 case mlir::StandardTypes::F32: in TypeToPrimitiveType()
52 case mlir::StandardTypes::F64: in TypeToPrimitiveType()
54 case mlir::StandardTypes::Integer: { in TypeToPrimitiveType()
[all …]
Dxla_mlir_translate.cc67 mlir::OwningModuleRef HloToMlirHloTranslateFunction( in HloToMlirHloTranslateFunction()
68 llvm::StringRef input, mlir::MLIRContext* context) { in HloToMlirHloTranslateFunction()
76 mlir::OwningModuleRef module = in HloToMlirHloTranslateFunction()
77 mlir::ModuleOp::create(mlir::UnknownLoc::get(context)); in HloToMlirHloTranslateFunction()
88 mlir::OwningModuleRef HloTextToMlirHloTranslateFunction( in HloTextToMlirHloTranslateFunction()
89 llvm::StringRef input, mlir::MLIRContext* context) { in HloTextToMlirHloTranslateFunction()
100 mlir::OwningModuleRef module = in HloTextToMlirHloTranslateFunction()
101 mlir::ModuleOp::create(mlir::UnknownLoc::get(context)); in HloTextToMlirHloTranslateFunction()
111 static mlir::LogicalResult MlirHloToHloTranslateFunction( in MlirHloToHloTranslateFunction()
112 mlir::ModuleOp module, llvm::raw_ostream& output) { in MlirHloToHloTranslateFunction()
[all …]
Dhlo_function_importer.cc43 using mlir::DenseElementsAttr;
44 using mlir::DenseIntElementsAttr;
45 using mlir::FuncOp;
46 using mlir::NamedAttribute;
47 using mlir::Operation;
48 using mlir::RankedTensorType;
49 using mlir::ShapedType;
50 using mlir::Type;
51 using mlir::Value;
107 StatusOr<mlir::FuncOp> HloFunctionImporter::ImportFunction( in ImportFunction()
[all …]
/external/tensorflow/third_party/mlir/
Dtest.BUILD1 load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl")
27 tblgen = "@llvm-project//mlir:mlir-tblgen",
30 "@llvm-project//mlir:LinalgTransformPatternsTdFiles",
42 tblgen = "@llvm-project//mlir:mlir-tblgen",
45 "@llvm-project//mlir:VectorTransformPatternsTdFiles",
74 tblgen = "@llvm-project//mlir:mlir-tblgen",
77 "@llvm-project//mlir:OpBaseTdFiles",
78 "@llvm-project//mlir:include/mlir/IR/OpAsmInterface.td",
79 "@llvm-project//mlir:include/mlir/Analysis/CallInterfaces.td",
80 "@llvm-project//mlir:include/mlir/Analysis/InferTypeOpInterface.td",
[all …]
DBUILD4 load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl")
22 "include/mlir/Dialect/LLVMIR/LLVMOps.td",
29 hdrs = ["include/mlir/IR/DialectSymbolRegistry.def"],
30 strip_include_prefix = "include/mlir/IR",
31 textual_hdrs = ["include/mlir/IR/DialectSymbolRegistry.def"],
40 "include/mlir/IR/OpAsmInterface.h.inc",
44 "include/mlir/IR/OpAsmInterface.cpp.inc",
47 tblgen = ":mlir-tblgen",
48 td_file = "include/mlir/IR/OpAsmInterface.td",
61 "include/mlir/IR/*.h",
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Ddevice_util_test.cc61 mlir::MLIRContext context; in TEST()
62 mlir::OwningModuleRef module_ref = in TEST()
63 mlir::ModuleOp::create(mlir::UnknownLoc::get(&context)); in TEST()
74 auto devices_attr = module_ref->getAttrOfType<mlir::ArrayAttr>("tf.devices"); in TEST()
77 auto device_attr_0 = devices_attr.getValue()[0].dyn_cast<mlir::StringAttr>(); in TEST()
81 auto device_attr_1 = devices_attr.getValue()[1].dyn_cast<mlir::StringAttr>(); in TEST()
88 mlir::MLIRContext context; in TEST()
89 mlir::OwningModuleRef module_ref = in TEST()
90 mlir::ModuleOp::create(mlir::UnknownLoc::get(&context)); in TEST()
97 mlir::MLIRContext context; in TEST()
[all …]
Dexport_utils.cc62 Status ConvertLocation(mlir::Location inst_loc, in ConvertLocation()
64 if (auto call_site = inst_loc.dyn_cast<mlir::CallSiteLoc>()) { in ConvertLocation()
65 if (auto name_loc = call_site.getCallee().dyn_cast<mlir::NameLoc>()) { in ConvertLocation()
68 } else if (auto fused = inst_loc.dyn_cast<mlir::FusedLoc>()) { in ConvertLocation()
80 Status ConvertAttribute(const mlir::BoolAttr& attr, AttrValue* value) { in ConvertAttribute()
85 Status ConvertAttribute(const mlir::IntegerAttr& attr, AttrValue* value) { in ConvertAttribute()
90 Status ConvertAttribute(const mlir::FloatAttr& attr, AttrValue* value) { in ConvertAttribute()
95 Status ConvertAttribute(const mlir::ElementsAttr& attr, AttrValue* value) { in ConvertAttribute()
99 Status ConvertAttribute(const mlir::StringAttr& attr, AttrValue* value) { in ConvertAttribute()
122 Status ConvertAttribute(mlir::Type type, AttrValue* value) { in ConvertAttribute()
[all …]
Dcompile_mlir_util.cc46 mlir::MLIRContext* mlir_context, in ParseMlirModule()
47 mlir::OwningModuleRef* mlir_module) { in ParseMlirModule()
53 *mlir_module = mlir::parseSourceString(mlir_module_string, mlir_context); in ParseMlirModule()
63 mlir::ModuleOp module, llvm::ArrayRef<TensorShape> arg_shapes, in GetXlaInputShapes()
68 mlir::FuncOp main_func = module.lookupSymbol<mlir::FuncOp>("main"); in GetXlaInputShapes()
69 mlir::FunctionType func_type = main_func.getType(); in GetXlaInputShapes()
93 mlir::ModuleOp module, in GetOutputInfo()
97 mlir::FuncOp main_func = module.lookupSymbol<mlir::FuncOp>("main"); in GetOutputInfo()
98 mlir::FunctionType func_type = main_func.getType(); in GetOutputInfo()
106 for (mlir::Type type : func_type.getResults()) { in GetOutputInfo()
[all …]
Dconvert_type.cc30 using mlir::Builder;
31 using mlir::ShapedType;
32 using mlir::Type;
64 *type = mlir::ComplexType::get(builder.getF32Type()); in ConvertDataType()
67 *type = mlir::ComplexType::get(builder.getF64Type()); in ConvertDataType()
71 *type = builder.getType<mlir::TF::tftype##Type>(); \ in ConvertDataType()
83 case mlir::StandardTypes::F16: in ConvertScalarTypeToDataType()
86 case mlir::StandardTypes::F32: in ConvertScalarTypeToDataType()
89 case mlir::StandardTypes::F64: in ConvertScalarTypeToDataType()
92 case mlir::StandardTypes::BF16: in ConvertScalarTypeToDataType()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/
DBUILD1 load("//third_party/mlir:tblgen.bzl", "gentbl")
11 includes = ["//third_party/mlir:subpackages"],
26 "@llvm-project//mlir:OpBaseTdFiles",
27 "@llvm-project//mlir:include/mlir/Analysis/CallInterfaces.td",
47 tblgen = "@llvm-project//mlir:mlir-tblgen",
70 tblgen = "@llvm-project//mlir:mlir-tblgen",
73 "@llvm-project//mlir:include/mlir/IR/OpBase.td",
74 "@llvm-project//mlir:include/mlir/Dialect/StandardOps/Ops.td",
94 tblgen = "@llvm-project//mlir:mlir-tblgen",
97 "@llvm-project//mlir:include/mlir/IR/OpBase.td",
[all …]
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlower_general_dot.cc33 using mlir::DenseIntElementsAttr;
34 using mlir::ElementsAttr;
35 using mlir::FunctionPass;
36 using mlir::MLIRContext;
37 using mlir::OpRewritePattern;
38 using mlir::OwningRewritePatternList;
39 using mlir::PassRegistration;
40 using mlir::PatternMatchResult;
41 using mlir::PatternRewriter;
42 using mlir::RankedTensorType;
[all …]
Dmap_xla_to_scalar_op.h25 namespace mlir {
33 using FOp = ::mlir::AddFOp;
34 using IOp = ::mlir::AddIOp;
38 using FOp = ::mlir::AddFOp;
39 using IOp = ::mlir::AddIOp;
43 using FOp = ::mlir::CmpFOp;
44 using IOp = ::mlir::CmpIOp;
48 using FOp = ::mlir::DivFOp;
49 using IOp = ::mlir::SignedDivIOp;
53 using FOp = ::mlir::DivFOp;
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dexport_graphdef.cc69 using mlir::BlockArgument;
70 using mlir::Dialect;
71 using mlir::Operation;
72 using mlir::OperationState;
73 using mlir::Value;
126 Status HasSingleGraphSingleOpIslandsFunctions(mlir::ModuleOp module) { in HasSingleGraphSingleOpIslandsFunctions()
128 module.walk([&](mlir::FuncOp function) { in HasSingleGraphSingleOpIslandsFunctions()
133 return mlir::WalkResult::interrupt(); in HasSingleGraphSingleOpIslandsFunctions()
137 auto graph = llvm::dyn_cast<mlir::tf_executor::GraphOp>(block.begin()); in HasSingleGraphSingleOpIslandsFunctions()
142 return mlir::WalkResult::interrupt(); in HasSingleGraphSingleOpIslandsFunctions()
[all …]
Dimport_model.cc141 void PopulateTfVersions(mlir::ModuleOp module, in PopulateTfVersions()
143 mlir::Builder b(module.getContext()); in PopulateTfVersions()
153 b.getDictionaryAttr(llvm::ArrayRef<mlir::NamedAttribute>( in PopulateTfVersions()
169 const GraphImportConfig& specs, mlir::ModuleOp module, in ImporterBase()
188 StatusOr<mlir::FunctionType> InferLibFunctionType(const FunctionBody& fbody);
208 Status Convert(llvm::StringRef func_name, mlir::FunctionType func_type,
212 llvm::ArrayRef<mlir::NamedAttribute> attrs,
229 StatusOr<mlir::TensorType> InferInputType(const Node& node, int idx,
230 mlir::Builder builder);
234 StatusOr<mlir::TensorType> InferOutputType(const Node& node, int idx,
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
DBUILD16 includes = ["//third_party/mlir:subpackages"],
17 packages = ["//tensorflow/compiler/mlir/..."],
29 "@llvm-project//mlir:OpBaseTdFiles",
30 "@llvm-project//mlir:QuantizationOpsTdFiles",
52 "//tensorflow/compiler/mlir/tensorflow:import_utils",
57 "@llvm-project//mlir:Analysis",
58 "@llvm-project//mlir:IR",
59 "@llvm-project//mlir:Pass",
60 "@llvm-project//mlir:QuantOps",
61 "@llvm-project//mlir:StandardOps",
[all …]

12345678910>>...21