Improve error handling in subgroup tests (#1352)

* MPGCOMP-14761 Improve error handling in subgroup tests

Signed-off-by: Stuart Brady <stuart.brady@arm.com>

* Add missing newline
This commit is contained in:
Stuart Brady
2021-11-16 11:27:04 +00:00
committed by GitHub
parent e9cd9a446e
commit 1116a71ba2
9 changed files with 74 additions and 59 deletions

View File

@@ -245,8 +245,8 @@ struct IFP
}
}
static int chk(cl_int *x, cl_int *y, cl_int *t, cl_int *, cl_int *,
const WorkGroupParams &test_params)
static test_status chk(cl_int *x, cl_int *y, cl_int *t, cl_int *, cl_int *,
const WorkGroupParams &test_params)
{
int i, k;
int nw = test_params.local_workgroup_size;
@@ -255,8 +255,8 @@ struct IFP
int nj = (nw + ns - 1) / ns;
ng = ng / nw;
// We need at least 2 sub groups per group for this tes
if (nj == 1) return 0;
// We need at least 2 sub groups per group for this test
if (nj == 1) return TEST_SKIPPED_ITSELF;
log_info(" independent forward progress...\n");
@@ -270,14 +270,14 @@ struct IFP
log_error(
"ERROR: mismatch at element %d in work group %d\n", i,
k);
return -1;
return TEST_FAIL;
}
}
x += nj * (NUM_LOC + 1);
y += NUM_LOC;
}
return 0;
return TEST_PASS;
}
};