Home
last modified time | relevance | path

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

12345678910>>...99

/external/tensorflow/tensorflow/compiler/mlir/python/mlir_wrapper/
Dops.cc24 py::class_<mlir::Operation, std::unique_ptr<mlir::Operation, py::nodelete>>( in init_ops()
26 .def("getRegion", &mlir::Operation::getRegion, in init_ops()
28 .def("getResult", &mlir::Operation::getResult) in init_ops()
29 .def("dump", &mlir::Operation::dump) in init_ops()
30 .def("getNumResults", &mlir::Operation::getNumResults); in init_ops()
32 py::class_<mlir::OperationState>(m, "OperationState") in init_ops()
33 .def(py::init([](mlir::Location loc, std::string name) { in init_ops()
34 return mlir::OperationState(loc, llvm::StringRef(name)); in init_ops()
37 [](mlir::OperationState& state, std::vector<mlir::Type> tys) { in init_ops()
38 state.addTypes(mlir::ArrayRef<mlir::Type>(tys)); in init_ops()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dtf_tfl_passes.cc33 namespace mlir { namespace
45 void AddQuantizationPasses(const mlir::TFL::QuantizationSpecs& quant_specs, in AddQuantizationPasses()
46 mlir::OpPassManager* pass_manager) { in AddQuantizationPasses()
47 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
48 mlir::TFL::CreatePrepareQuantizePass(quant_specs)); in AddQuantizationPasses()
51 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
52 mlir::TFL::CreateDefaultQuantParamsPass( in AddQuantizationPasses()
57 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
58 mlir::TFL::CreateQuantizePass(quant_specs.verify_numeric)); in AddQuantizationPasses()
61 pass_manager->addNestedPass<mlir::FuncOp>( in AddQuantizationPasses()
[all …]
DBUILD10 "//third_party/mlir:tblgen.bzl",
25 includes = ["//third_party/mlir:subpackages"],
27 "//learning/brain/experimental/mlir/tflite/tfmrt/...",
28 "//learning/brain/mlir/...",
29 "//tensorflow/compiler/mlir/...",
40 "//tensorflow/compiler/mlir/lite/quantization:quantization_td_files",
41 "//tensorflow/compiler/mlir/tensorflow:tensorflow_ops_td_files",
42 "@llvm-project//mlir:OpBaseTdFiles",
43 "@llvm-project//mlir:SideEffectTdFiles",
44 "@llvm-project//mlir:include/mlir/Interfaces/InferTypeOpInterface.td",
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/mlir_gpu/
Dkernel_lowering.cc50 Status LowerLHLOToGPU(mlir::ModuleOp module, LowerLHLOToGPUOptions options) { in LowerLHLOToGPU()
51 mlir::PassManager pm(module.getContext()); in LowerLHLOToGPU()
71 pm.addPass(::mlir::mhlo::createLegalizeToLhloPass()); in LowerLHLOToGPU()
73 pm.addNestedPass<mlir::FuncOp>(::mlir::createBufferHoistingPass()); in LowerLHLOToGPU()
74 pm.addNestedPass<mlir::FuncOp>(::mlir::createBufferDeallocationPass()); in LowerLHLOToGPU()
76 pm.addNestedPass<mlir::FuncOp>(createFusionOpRemoverPass()); in LowerLHLOToGPU()
78 pm.addNestedPass<mlir::FuncOp>(::mlir::createCopyRemovalPass()); in LowerLHLOToGPU()
80 pm.addNestedPass<mlir::FuncOp>(::mlir::lmhlo::createLegalizeToGpuPass()); in LowerLHLOToGPU()
82 pm.addNestedPass<mlir::FuncOp>( in LowerLHLOToGPU()
83 ::mlir::lmhlo::createLegalizeLhloToLinalgPass()); in LowerLHLOToGPU()
[all …]
DBUILD4 load("//third_party/mlir:tblgen.bzl", "gentbl")
37 tblgen = "@llvm-project//mlir:mlir-tblgen",
39 td_srcs = ["@llvm-project//mlir:PassBaseTdFiles"],
48 "//tensorflow/compiler/mlir/hlo:lhlo",
51 "@llvm-project//mlir:GPUDialect",
52 "@llvm-project//mlir:GPUTransforms",
53 "@llvm-project//mlir:IR",
54 "@llvm-project//mlir:Pass",
55 "@llvm-project//mlir:SCFDialect",
56 "@llvm-project//mlir:SCFTransforms",
[all …]
Dpasses.cc41 getFunction().walk([&](mlir::lmhlo::FusionOp op) { in runOnFunction()
42 mlir::OpBuilder builder(op); in runOnFunction()
45 mlir::BlockAndValueMapping mapping; in runOnFunction()
59 bool HasEffectsOnValue(mlir::Value value, mlir::Operation* op) { in HasEffectsOnValue()
61 mlir::dyn_cast_or_null<mlir::MemoryEffectOpInterface>(op); in HasEffectsOnValue()
65 llvm::SmallVector<mlir::MemoryEffects::EffectInstance, 2> effects; in HasEffectsOnValue()
68 [op](const mlir::MemoryEffects::EffectInstance& effect) { in HasEffectsOnValue()
69 return mlir::isa<EffectTy>(effect.getEffect()); in HasEffectsOnValue()
74 mlir::StoreOp findStore(mlir::Operation* op, in findStore()
75 std::function<bool(mlir::StoreOp)> matches) { in findStore()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/
Dkernel_creator.cc73 using mlir::Value;
74 using mlir::scf::ParallelOp;
89 auto type = alloc.getType().dyn_cast<mlir::ShapedType>(); in IsSmallAlloc()
90 if (!type || !alloc.getDefiningOp<mlir::AllocOp>()) return false; in IsSmallAlloc()
99 if (auto select = alloc_arg.getDefiningOp<mlir::SelectOp>()) { in IsSmallAlloc()
100 if (!select.true_value().getDefiningOp<mlir::RankOp>() || in IsSmallAlloc()
101 !select.false_value().getDefiningOp<mlir::RankOp>()) in IsSmallAlloc()
103 } else if (!alloc_arg.getDefiningOp<mlir::RankOp>()) { in IsSmallAlloc()
120 : public mlir::PassWrapper<RemoveUnusedTensorToMemrefOperations,
121 mlir::FunctionPass> {
[all …]
/external/llvm-project/flang/include/flang/Lower/
DFIRBuilder.h38 class FirOpBuilder : public mlir::OpBuilder {
40 explicit FirOpBuilder(mlir::Operation *op, const fir::KindMapping &kindMap) in FirOpBuilder()
44 mlir::Region &getRegion() { return *getBlock()->getParent(); } in getRegion()
47 mlir::ModuleOp getModule() { in getModule()
48 return getRegion().getParentOfType<mlir::ModuleOp>(); in getModule()
52 mlir::FuncOp getFunction() { in getFunction()
53 return getRegion().getParentOfType<mlir::FuncOp>(); in getFunction()
63 mlir::Value convertWithSemantics(mlir::Location loc, mlir::Type toTy,
64 mlir::Value val);
67 mlir::Block *getEntryBlock() { return &getFunction().front(); } in getEntryBlock()
[all …]
DCharacterExpr.h21 explicit CharacterExprHelper(FirOpBuilder &builder, mlir::Location loc) in CharacterExprHelper()
34 void createCopy(mlir::Value dest, mlir::Value src, mlir::Value count);
40 void createPadding(mlir::Value str, mlir::Value lower, mlir::Value upper);
44 mlir::Value createSubstring(mlir::Value str,
45 llvm::ArrayRef<mlir::Value> bounds);
48 mlir::Value createBlankConstant(fir::CharacterType type);
52 void createAssign(mlir::Value lhs, mlir::Value rhs);
56 void createAssign(mlir::Value lptr, mlir::Value llen, mlir::Value rptr,
57 mlir::Value rlen);
60 mlir::Value createConcatenate(mlir::Value lhs, mlir::Value rhs);
[all …]
/external/llvm-project/flang/include/flang/Optimizer/Dialect/
DFIRType.h24 namespace mlir {
60 bool isa_fir_type(mlir::Type t);
63 bool isa_std_type(mlir::Type t);
66 bool isa_fir_or_std_type(mlir::Type t);
69 bool isa_ref_type(mlir::Type t);
72 bool isa_passbyref_type(mlir::Type t);
75 bool isa_box_type(mlir::Type t);
80 inline bool conformsWithPassByRef(mlir::Type t) { in conformsWithPassByRef()
85 bool isa_aggregate(mlir::Type t);
89 mlir::Type dyn_cast_ptrEleTy(mlir::Type t);
[all …]
DFIRDialect.h19 class FIROpsDialect final : public mlir::Dialect {
21 explicit FIROpsDialect(mlir::MLIRContext *ctx);
26 mlir::Type parseType(mlir::DialectAsmParser &parser) const override;
27 void printType(mlir::Type ty, mlir::DialectAsmPrinter &p) const override;
29 mlir::Attribute parseAttribute(mlir::DialectAsmParser &parser,
30 mlir::Type type) const override;
31 void printAttribute(mlir::Attribute attr,
32 mlir::DialectAsmPrinter &p) const override;
36 inline void registerFIRDialects(mlir::DialectRegistry &registry) { in registerFIRDialects()
38 registry.insert<mlir::AffineDialect, in registerFIRDialects()
[all …]
DFIROps.h16 using namespace mlir; variable
24 void buildCmpFOp(mlir::OpBuilder &builder, mlir::OperationState &result,
25 mlir::CmpFPredicate predicate, mlir::Value lhs,
26 mlir::Value rhs);
27 void buildCmpCOp(mlir::OpBuilder &builder, mlir::OperationState &result,
28 mlir::CmpFPredicate predicate, mlir::Value lhs,
29 mlir::Value rhs);
30 unsigned getCaseArgumentOffset(llvm::ArrayRef<mlir::Attribute> cases,
32 LoopOp getForInductionVarOwner(mlir::Value val);
33 bool isReferenceLike(mlir::Type type);
[all …]
/external/tensorflow/tensorflow/compiler/mlir/xla/
Dhlo_utils.cc32 using mlir::AffineMap;
33 using mlir::Builder;
34 using mlir::DenseElementsAttr;
35 using mlir::ShapedType;
40 ::mlir::DenseElementsAttr CreateDenseAttrFromLiteral( in CreateDenseAttrFromLiteral()
43 return ::mlir::DenseElementsAttr::get( in CreateDenseAttrFromLiteral()
48 const Shape& shape, mlir::Builder builder) { in GetPermutationIfAvailable()
71 void CopyDenseElementsBy(mlir::DenseElementsAttr data, in CopyDenseElementsBy()
83 StatusOr<mlir::MemRefType> ConvertTensorShapeToMemRefType( in ConvertTensorShapeToMemRefType()
84 const Shape& shape, mlir::Builder builder) { in ConvertTensorShapeToMemRefType()
[all …]
Dhlo_function_importer.h49 mlir::ModuleOp module,
51 mlir::FuncOp>* function_map,
52 mlir::Builder* builder);
56 mlir::Region* region, mlir::Builder* builder);
60 static StatusOr<mlir::Value> ImportInstructions(
62 const llvm::SmallVectorImpl<mlir::Value>& arguments,
63 mlir::OpBuilder* builder);
65 static void SetLayoutForMlir(mlir::Operation* op, const Shape& shape);
69 static mlir::NamedAttribute ConvertSourceTargetPairs(
72 mlir::Builder* builder);
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/
DBUILD8 load("//third_party/mlir:tblgen.bzl", "gentbl")
20 includes = ["//third_party/mlir:subpackages"],
24 "//learning/brain/experimental/mlir/...",
26 "//learning/brain/google/xla/mlir/...",
30 "//tensorflow/compiler/mlir/...",
38 exports_files(["include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td"])
40 exports_files(["include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td"])
45 "include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td",
46 "include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td",
47 "include/mlir-hlo/Dialect/mhlo/IR/hlo_ops_base.td",
[all …]
/external/llvm-project/mlir/test/mlir-tblgen/
Dop-decl.td1 // RUN: mlir-tblgen -gen-op-decls -I %S/../../include %s | FileCheck %s
2 // RUN: mlir-tblgen -gen-op-decls -op-include-regex="test.a_op" -I %S/../../include %s | FileCheck …
3 // RUN: mlir-tblgen -gen-op-decls -op-exclude-regex="test.a_op" -I %S/../../include %s | FileCheck …
5 include "mlir/IR/OpBase.td"
6 include "mlir/Interfaces/InferTypeOpInterface.td"
7 include "mlir/Interfaces/SideEffectInterfaces.td"
56 // CHECK: AOpAdaptor(::mlir::ValueRange values
57 // CHECK: ::mlir::ValueRange getODSOperands(unsigned index);
58 // CHECK: ::mlir::Value a();
59 // CHECK: ::mlir::ValueRange b();
[all …]
/external/llvm-project/debuginfo-tests/llvm-prettyprinters/gdb/
Dmlir-support.cpp8 mlir::MLIRContext Context;
10 auto Identifier = mlir::Identifier::get("foo", &Context);
11 mlir::OperationName OperationName("FooOp", &Context);
12 mlir::Value Value({reinterpret_cast<void *>(0x8),
13 mlir::Value::Kind::TrailingOpResult});
15 mlir::Type Type(nullptr);
16 mlir::Type IndexType = mlir::IndexType::get(&Context);
17 mlir::Type IntegerType =
18 mlir::IntegerType::get(3, mlir::IntegerType::Unsigned, &Context);
19 mlir::Type FloatType = mlir::Float32Type::get(&Context);
[all …]
/external/tensorflow/third_party/mlir/
Dtest.BUILD1 load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl")
28 "@llvm-project//mlir:Analysis",
29 "@llvm-project//mlir:IR",
30 "@llvm-project//mlir:Pass",
31 "@llvm-project//mlir:Support",
40 "@llvm-project//mlir:OpBaseTdFiles",
41 "@llvm-project//mlir:SideEffectTdFiles",
42 "@llvm-project//mlir:include/mlir/IR/OpAsmInterface.td",
43 "@llvm-project//mlir:include/mlir/IR/RegionKindInterface.td",
44 "@llvm-project//mlir:include/mlir/IR/SymbolInterfaces.td",
[all …]
/external/llvm-project/flang/lib/Lower/
DIntrinsicCall.cpp95 mlir::Location loc) in IntrinsicLibrary()
103 mlir::Type resultType,
113 mlir::Value genRuntimeCall(llvm::StringRef name, mlir::Type,
114 llvm::ArrayRef<mlir::Value>);
117 std::function<mlir::Value(Fortran::lower::FirOpBuilder &, mlir::Location,
118 llvm::ArrayRef<mlir::Value>)>;
121 mlir::FunctionType soughtFuncType);
123 mlir::Value genAbs(mlir::Type, llvm::ArrayRef<mlir::Value>);
124 mlir::Value genAimag(mlir::Type, llvm::ArrayRef<mlir::Value>);
125 mlir::Value genAint(mlir::Type, llvm::ArrayRef<mlir::Value>);
[all …]
DFIRBuilder.cpp18 mlir::FuncOp Fortran::lower::FirOpBuilder::createFunction( in createFunction()
19 mlir::Location loc, mlir::ModuleOp module, llvm::StringRef name, in createFunction()
20 mlir::FunctionType ty) { in createFunction()
24 mlir::FuncOp
25 Fortran::lower::FirOpBuilder::getNamedFunction(mlir::ModuleOp modOp, in getNamedFunction()
27 return modOp.lookupSymbol<mlir::FuncOp>(name); in getNamedFunction()
31 Fortran::lower::FirOpBuilder::getNamedGlobal(mlir::ModuleOp modOp, in getNamedGlobal()
36 mlir::Type Fortran::lower::FirOpBuilder::getRefType(mlir::Type eleTy) { in getRefType()
41 mlir::Value
42 Fortran::lower::FirOpBuilder::createNullConstant(mlir::Location loc) { in createNullConstant()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/transforms/
DBUILD1 load("//third_party/mlir:tblgen.bzl", "gentbl")
13 default_visibility = ["//tensorflow/compiler/mlir/tools/kernel_gen:friends"],
23 "//tensorflow/compiler/mlir/tools/kernel_gen/ir:tf_framework_ops",
25 "@llvm-project//mlir:IR",
26 "@llvm-project//mlir:LLVMDialect",
27 "@llvm-project//mlir:LLVMTransforms",
28 "@llvm-project//mlir:StandardOps",
29 "@llvm-project//mlir:Support",
30 "@llvm-project//mlir:Transforms",
40 "@llvm-project//mlir:IR",
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Ddevice_util_test.cc62 mlir::MLIRContext context; in TEST()
63 mlir::OwningModuleRef module_ref = in TEST()
64 mlir::ModuleOp::create(mlir::UnknownLoc::get(&context)); in TEST()
80 (*module_ref)->getAttrOfType<mlir::DictionaryAttr>("tf.devices"); in TEST()
85 auto device_meta_0 = devices_attr.get(cpu0).dyn_cast<mlir::DictionaryAttr>(); in TEST()
91 devices_attr.get(gpu0).dyn_cast<mlir::TF::GpuDeviceMetadata>(); in TEST()
97 auto device_meta_2 = devices_attr.get(gpu1).dyn_cast<mlir::DictionaryAttr>(); in TEST()
103 mlir::MLIRContext context; in TEST()
104 mlir::OwningModuleRef module_ref = in TEST()
105 mlir::ModuleOp::create(mlir::UnknownLoc::get(&context)); in TEST()
[all …]
/external/llvm-project/flang/lib/Optimizer/Dialect/
DFIROps.cpp28 static bool verifyInType(mlir::Type inType, in verifyInType()
57 static bool verifyRecordLenParams(mlir::Type inType, unsigned numLenParams) { in verifyRecordLenParams()
70 mlir::OpFoldResult fir::AddfOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
71 return mlir::constFoldBinaryOp<FloatAttr>( in fold()
79 mlir::Type fir::AllocaOp::getAllocatedType() { in getAllocatedType()
84 mlir::Type fir::AllocaOp::wrapResultType(mlir::Type intype) { in wrapResultType()
91 mlir::Type fir::AllocaOp::getRefTy(mlir::Type ty) { in getRefTy()
99 mlir::Type fir::AllocMemOp::getAllocatedType() { in getAllocatedType()
103 mlir::Type fir::AllocMemOp::getRefTy(mlir::Type ty) { in getRefTy()
108 mlir::Type fir::AllocMemOp::wrapResultType(mlir::Type intype) { in wrapResultType()
[all …]
/external/llvm-project/mlir/examples/toy/Ch7/mlir/
DDialect.cpp22 using namespace mlir;
23 using namespace mlir::toy;
85 ToyDialect::ToyDialect(mlir::MLIRContext *ctx) in ToyDialect()
86 : mlir::Dialect(getDialectNamespace(), ctx, TypeID::get<ToyDialect>()) { in ToyDialect()
95 mlir::Operation *ToyDialect::materializeConstant(mlir::OpBuilder &builder, in materializeConstant()
96 mlir::Attribute value, in materializeConstant()
97 mlir::Type type, in materializeConstant()
98 mlir::Location loc) { in materializeConstant()
101 value.cast<mlir::ArrayAttr>()); in materializeConstant()
103 value.cast<mlir::DenseElementsAttr>()); in materializeConstant()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tfjs/
DBUILD7 load("//third_party/mlir:tblgen.bzl", "gentbl")
19 "@llvm-project//mlir:OpBaseTdFiles",
44 tblgen = "@llvm-project//mlir:mlir-tblgen",
48 "@llvm-project//mlir:OpBaseTdFiles",
49 "@llvm-project//mlir:include/mlir/Interfaces/LoopLikeInterface.td",
50 "@llvm-project//mlir:SideEffectTdFiles",
68 "@llvm-project//mlir:Dialect",
69 "@llvm-project//mlir:IR",
70 "@llvm-project//mlir:SideEffects",
71 "@llvm-project//mlir:StandardOps",
[all …]

12345678910>>...99