Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/plugins/input/TOSA/InputConversion/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ void buildTOSAInputConversionPassPipeline(OpPassManager &passManager) {

TosaToLinalgNamedOptions tosaToLinalgNamedOptions;
tosaToLinalgNamedOptions.preferConv2DKernelLayoutHWCF = true;
tosa::TosaValidationOptions tosaValidationOptions;
tosaValidationOptions.profile = {"bi", "mi", "mt"};
tosa::addTosaToLinalgPasses(passManager, TosaToLinalgOptions(),
tosaToLinalgNamedOptions);
tosaToLinalgNamedOptions, tosaValidationOptions);
passManager.addNestedPass<func::FuncOp>(
iree_compiler::createConverti48Toi64Pass());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class EnforceLayout : public DataFlowAnalysis {

LogicalResult initialize(Operation *root) override;

LogicalResult visit(ProgramPoint point) override;
LogicalResult visit(ProgramPoint *point) override;

void registerNewValue(Value val, const VectorLayoutInterface &layout);

Expand All @@ -147,7 +147,7 @@ class PropagateLayout : public DataFlowAnalysis {

LogicalResult initialize(Operation *root) override;

LogicalResult visit(ProgramPoint point) override;
LogicalResult visit(ProgramPoint *point) override;

/// Register a new value to be part of the dataflow analysis. The value should
/// not be part of the analysis already. This is used for new values that are
Expand Down Expand Up @@ -308,7 +308,7 @@ void DistributionLayout::onUpdate(DataFlowSolver *solver) const {
if (propagation) {
// Make propagation run again on all users of this value.
for (Operation *user : value.getUsers()) {
solver->enqueue({user, propagation});
solver->enqueue({solver->getProgramPointAfter(user), propagation});
}
// TODO: Maybe we need to run it on the parent operation as well to give
// layout to other results? Seems unlikely though as results usually
Expand All @@ -318,17 +318,19 @@ void DistributionLayout::onUpdate(DataFlowSolver *solver) const {
if (enforcement) {
// Make enforcement run on the parent.
if (Operation *definingOp = value.getDefiningOp()) {
solver->enqueue({definingOp, enforcement});
solver->enqueue({solver->getProgramPointAfter(definingOp), enforcement});
} else {
// TODO: This is not always correct. Ideally, we should enqueue all
// predecessors of these block arguements.
solver->enqueue({value.getParentBlock()->getParentOp(), enforcement});
solver->enqueue(
{solver->getProgramPointAfter(value.getParentBlock()->getParentOp()),
enforcement});
}

// Enforce users of this value also, as some other operands may need to
// be updated.
for (Operation *user : value.getUsers()) {
solver->enqueue({user, enforcement});
solver->enqueue({solver->getProgramPointAfter(user), enforcement});
}
}
}
Expand Down Expand Up @@ -849,8 +851,11 @@ LogicalResult PropagateLayout::initialize(Operation *root) {
return success();
}

LogicalResult PropagateLayout::visit(ProgramPoint point) {
if (Operation *op = dyn_cast_or_null<Operation *>(point)) {
LogicalResult PropagateLayout::visit(ProgramPoint *point) {
if (point->isBlockStart())
return success();

if (auto op = point->getPrevOp()) {
visitOperation(op);
return success();
}
Expand Down Expand Up @@ -969,8 +974,11 @@ LogicalResult EnforceLayout::initialize(Operation *root) {
return success();
}

LogicalResult EnforceLayout::visit(ProgramPoint point) {
if (Operation *op = dyn_cast_or_null<Operation *>(point)) {
LogicalResult EnforceLayout::visit(ProgramPoint *point) {
if (point->isBlockStart())
return success();

if (auto op = point->getPrevOp()) {
visitOperation(op);
return success();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class DataFlowListener : public RewriterBase::Listener {

protected:
void notifyOperationErased(Operation *op) override {
s.eraseState(op);
s.eraseState(s.getProgramPointAfter(op));
for (Value res : op->getResults())
flushValue(res);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ static bool isaTransposeOpInterface(linalg::LinalgOp linalgOp) {
// single input.
static void specializeGenericTransposeOp(RewriterBase &rewriter,
linalg::GenericOp genericOp) {
if (!isaTransposeOpInterface(genericOp)) {
if (!mlir::iree_compiler::GlobalOptimization::isaTransposeOpInterface(
genericOp)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 1580 files