Dear everyone,
I’m trying to run my code on GPU and evaluate its correctness using the autocompare feature.
However, I’ve seen output about
variable 'dp' in PCAST compare has no type information and cannot be compared
.
And it seems to be endless ( maybe I’m too impatient to wait for it’s done outputing? )
The data type for dp is:
typedef struct GACT_Cell {
uint32_t op: 2;
uint32_t E: 10;
uint32_t F: 10;
uint32_t H: 10;
} GACT_Cell;
The code I’m talking about:
GACT_Cell(*dp)[qlen + 1] = (GACT_Cell(*)[qlen + 1]) dp_table;
#pragma acc data copyin(ref, qry, ref.data[rlen], qry.data[qlen], mat[N][N]) \
copy(dp[rlen + 1][qlen + 1])
{
#pragma acc parallel loop independent present(mat, ref.data, qry.data)
for (int wf = 0; wf < num_wavefronts; ++wf) {
#pragma acc loop independent vector
for (int x = 1; x <= wf + 1 && x <= qlen; ++x) {
int y = wf + 2 - x;
if (y >= 1 && y <= wf + 1 && y <= rlen) {
GACT_Cell c = dp[y][x];
GACT_Cell t = dp[y][x - 1];
int to = (int)t.H - go;
int te = (int)t.E - ge;
int E = to > te ? to : te;
E = E > 0 ? E : 0;
t = dp[y - 1][x];
to = (int)t.H - go;
te = (int)t.F - ge;
int F = to > te ? to : te;
F = F > 0 ? F : 0;
int qc = qry.data[x - 1];
int rc = ref.data[y - 1];
t = dp[y - 1][x - 1];
int H = (int)t.H + mat[rc][qc];
int v;
int op = maxi(0, E, F, H, &v);
if (qc == rc && op == 3) {
op = 0;
}
c.op = op;
c.H = v;
dp[y][x] = c;
}
}
}
Is there any solution that I can use autocompare for customized types? Thank you so much for your help!