math_brute_force: skip all enqueues in -l mode (#1993)

The math_brute_force test has a link-check-only mode to quickly test if
all math functions are present.

In link-check-only mode, most tests return immediately after kernel
compilation, but some tests also run the kernel and read back the result
data before returning. Running the kernels takes a lot more time,
defeating the purpose of the `-l` mode.

Break out at the start of the main `for` loops in link-check-only mode
instead of returning directly, so that each test can still log its
trailing message (in most cases just a `\n`).

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2024-08-06 18:26:38 +02:00
committed by GitHub
parent 8974d74db7
commit 5be093e0c8
21 changed files with 42 additions and 50 deletions

View File

@@ -94,6 +94,8 @@ int TestFunc_Half_Half_Half_Half(const Func *f, MTdata d, bool relaxedMode)
for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;
// Init input array
cl_half *hp0 = (cl_half *)gIn;
cl_half *hp1 = (cl_half *)gIn2;
@@ -262,8 +264,6 @@ int TestFunc_Half_Half_Half_Half(const Func *f, MTdata d, bool relaxedMode)
}
}
if (gSkipCorrectnessTesting) break;
// Verify data
uint16_t *t = (uint16_t *)gOut_Ref;
for (size_t j = 0; j < bufferElements; j++)