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 override
pull/1346/head
Ashay Rane 2022-09-07 14:35:14 -05:00 committed by GitHub
parent 99093d0623
commit 93f7c0ceb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 8 deletions

@ -1 +1 @@
Subproject commit 00d648bdb5a8b71785269b4851b651c883de2cd9
Subproject commit d2613d5bb5dca0624833e4747f67db6fe3236ce8

2
externals/mlir-hlo vendored

@ -1 +1 @@
Subproject commit 305a2f25229660ea789bf70ed8e7336227f6228a
Subproject commit 3bfb91e4ee44352f6620603078e2e2fc587d9a1e

View File

@ -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();

View File

@ -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;
}

View File

@ -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):