mirror of https://github.com/llvm/torch-mlir
build: update llvm tag to d2613d5b (#1343)
Summary of changes: - Update the dataflow analysis in RefineTypes.cpp - Add tosa-to-arith pass after tosa-to-linalg pass, since tosa-to-linalg (and canonicalizations) can produce tosa.const() ops - Fixed warning about not making `matchAndRewrite` as overridepull/1346/head
parent
99093d0623
commit
93f7c0ceb5
|
@ -1 +1 @@
|
|||
Subproject commit 00d648bdb5a8b71785269b4851b651c883de2cd9
|
||||
Subproject commit d2613d5bb5dca0624833e4747f67db6fe3236ce8
|
|
@ -1 +1 @@
|
|||
Subproject commit 305a2f25229660ea789bf70ed8e7336227f6228a
|
||||
Subproject commit 3bfb91e4ee44352f6620603078e2e2fc587d9a1e
|
|
@ -609,8 +609,9 @@ public:
|
|||
return mhloConvOp.getResult();
|
||||
}
|
||||
|
||||
LogicalResult matchAndRewrite(AtenConvolutionOp op, OpAdaptor adaptor,
|
||||
ConversionPatternRewriter &rewriter) const {
|
||||
LogicalResult
|
||||
matchAndRewrite(AtenConvolutionOp op, OpAdaptor adaptor,
|
||||
ConversionPatternRewriter &rewriter) const override {
|
||||
Value input = adaptor.input();
|
||||
Value weight = adaptor.weight();
|
||||
|
||||
|
|
|
@ -383,6 +383,12 @@ public:
|
|||
void visitOperation(Operation *op, ArrayRef<const ValueState *> operands,
|
||||
ArrayRef<ValueState *> results) final;
|
||||
|
||||
void setToEntryState(ValueState *lattice) override {
|
||||
auto refType = lattice->getPoint().getType();
|
||||
auto knowledge = ValueKnowledge::getKnowledgeFromType(refType);
|
||||
propagateIfChanged(lattice, lattice->join(knowledge));
|
||||
}
|
||||
|
||||
private:
|
||||
// Get the MLIR type of the tensor dtype given the dtype integer value and the
|
||||
// input dtype. When DType is None the type is inferred from the input dtype.
|
||||
|
@ -1106,9 +1112,8 @@ void TypeAnalysis::visitOperation(Operation *op,
|
|||
return;
|
||||
}
|
||||
|
||||
// Otherwise, this is an unknown operation. Just mark all results as
|
||||
// having reached a pessimistic fixpoint.
|
||||
markAllPessimisticFixpoint(results);
|
||||
// Otherwise, this is an unknown operation, so reset the state.
|
||||
setAllToEntryStates(results);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,13 @@ class LinalgOnTensorsTosaBackend(TosaBackend):
|
|||
"func.func(tosa-to-linalg-named)",
|
||||
"Lowering TOSA to Linalg-on-Tensors for Named Ops")
|
||||
|
||||
# TOSA-to-LinAlg may generate tosa.const() ops, so we want to lower them
|
||||
# to arith.constants here before proceeding further.
|
||||
run_pipeline_with_repro_report(
|
||||
imported_module,
|
||||
"func.func(tosa-to-linalg)",
|
||||
"func.func(tosa-to-linalg),func.func(tosa-to-arith)",
|
||||
"Lowering TOSA to Linalg-on-Tensors")
|
||||
|
||||
return self.refbackend.compile(imported_module)
|
||||
|
||||
def load(self, module):
|
||||
|
|
Loading…
Reference in New Issue