-
Notifications
You must be signed in to change notification settings - Fork 15
Mapping failed on nested loops #131
Copy link
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Related to PR129.
For a simple nested loop with two layers, the mapping pass cannot find a valid mapping and will output [DEBUG] mapping failed for II = 10.
An example:
// RUN: clang++ -S -emit-llvm kernel.cpp -o kernel.ll
// RUN: mlir-translate --import-llvm kernel.ll -o kernel.mlir
// RUN: mlir-neura-opt --assign-accelerator \
// RUN: --lower-llvm-to-neura \
// RUN: --canonicalize-live-in \
// RUN: --leverage-predicated-value \
// RUN: --transform-ctrl-to-data-flow \
// RUN: --fold-constant \
// RUN: --insert-data-mov \
// RUN: --map-to-accelerator="mapping-strategy=heuristic backtrack-config=simple" --generate-code kernel.mlir | FileCheck %s --check-prefix=CHECK-LLVM2NEURA-MAP
#include <stdio.h>
#define NTAPS 32
int input[NTAPS];
int output[NTAPS];
int coefficients[NTAPS];
void kernel(int input[], int output[], int coefficient[]);
int main()
{
kernel(input, output, coefficients);
return 0;
}
void kernel(int input[], int output[], int coefficient[]) {
int i, j;
for (i = 0; i < NTAPS; ++i) {
for (j = 0; j < NTAPS; ++j) {
}
}
}I tried to increase the max_location_to_try from 10 to 500, max_backtrack_depth from 3 to 20, maxII from 10 to 100 but it can not work still.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working