Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math_brute_force: skip all enqueues in -l mode #1993

Merged
merged 1 commit into from
Aug 6, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
double *p2 = (double *)gIn2;
Expand Down Expand Up @@ -264,8 +266,6 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint64_t *t = (uint64_t *)gOut_Ref;
int32_t *t2 = (int32_t *)gOut_Ref2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_uint *p = (cl_uint *)gIn;
cl_uint *p2 = (cl_uint *)gIn2;
Expand Down Expand Up @@ -266,8 +268,6 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
int32_t *t2 = (int32_t *)gOut_Ref2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ int TestFunc_HalfI_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 *p = (cl_half *)gIn;
cl_half *p2 = (cl_half *)gIn2;
Expand Down Expand Up @@ -257,8 +259,6 @@ int TestFunc_HalfI_Half_Half(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
cl_half *t = (cl_half *)gOut_Ref;
int32_t *t2 = (int32_t *)gOut_Ref2;
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/i_unary_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int TestFunc_Int_Double(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -163,8 +165,6 @@ int TestFunc_Int_Double(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(cl_double); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/i_unary_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int TestFunc_Int_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_uint *p = (cl_uint *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -162,8 +164,6 @@ int TestFunc_Int_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(float); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/i_unary_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ int TestFunc_Int_Half(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 16); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_ushort *p = (cl_ushort *)gIn;

Expand Down Expand Up @@ -160,8 +162,6 @@ int TestFunc_Int_Half(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
for (size_t j = 0; j < bufferElements; j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/mad_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ int TestFunc_mad_Double(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
double *p2 = (double *)gIn2;
Expand Down Expand Up @@ -186,8 +188,6 @@ int TestFunc_mad_Double(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data -- No verification possible.
// MAD is a random number generator.
if (0 == (i & 0x0fffffff))
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/mad_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ int TestFunc_mad_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_uint *p = (cl_uint *)gIn;
cl_uint *p2 = (cl_uint *)gIn2;
Expand Down Expand Up @@ -187,8 +189,6 @@ int TestFunc_mad_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data -- No verification possible.
// MAD is a random number generator.
if (0 == (i & 0x0fffffff))
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/mad_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int TestFunc_mad_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_ushort *p = (cl_ushort *)gIn;
cl_ushort *p2 = (cl_ushort *)gIn2;
Expand Down Expand Up @@ -173,8 +175,6 @@ int TestFunc_mad_Half(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data - no verification possible. MAD is a random number
// generator.

Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/ternary_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ int TestFunc_Double_Double_Double_Double(const Func *f, MTdata d,

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
double *p2 = (double *)gIn2;
Expand Down Expand Up @@ -291,8 +293,6 @@ int TestFunc_Double_Double_Double_Double(const Func *f, MTdata d,
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint64_t *t = (uint64_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(double); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/ternary_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ int TestFunc_Float_Float_Float_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_uint *p = (cl_uint *)gIn;
cl_uint *p2 = (cl_uint *)gIn2;
Expand Down Expand Up @@ -328,8 +330,6 @@ int TestFunc_Float_Float_Float_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(float); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/ternary_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ int TestFunc_Double2_Double(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -203,8 +205,6 @@ int TestFunc_Double2_Double(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint64_t *t = (uint64_t *)gOut_Ref;
uint64_t *t2 = (uint64_t *)gOut_Ref2;
Expand Down
8 changes: 2 additions & 6 deletions test_conformance/math_brute_force/unary_two_results_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ int TestFunc_Float2_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
uint32_t *p = (uint32_t *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -258,12 +260,6 @@ int TestFunc_Float2_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting)
{
if (isFract && gIsInRTZMode) (void)set_round(oldRoundMode, kfloat);
EwanC marked this conversation as resolved.
Show resolved Hide resolved
break;
}

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
uint32_t *t2 = (uint32_t *)gOut_Ref2;
Expand Down
8 changes: 2 additions & 6 deletions test_conformance/math_brute_force/unary_two_results_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ int TestFunc_Half2_Half(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 16); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_half *pIn = (cl_half *)gIn;
for (size_t j = 0; j < bufferElements; j++) pIn[j] = (cl_ushort)i + j;
Expand Down Expand Up @@ -231,12 +233,6 @@ int TestFunc_Half2_Half(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting)
{
if (isFract && gIsInRTZMode) (void)set_round(oldRoundMode, kfloat);
break;
}

// Verify data
for (size_t j = 0; j < bufferElements; j++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ int TestFunc_DoubleI_Double(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
double *p = (double *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -207,8 +209,6 @@ int TestFunc_DoubleI_Double(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint64_t *t = (uint64_t *)gOut_Ref;
int32_t *t2 = (int32_t *)gOut_Ref2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ int TestFunc_FloatI_Float(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
uint32_t *p = (uint32_t *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -212,8 +214,6 @@ int TestFunc_FloatI_Float(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
int32_t *t2 = (int32_t *)gOut_Ref2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ int TestFunc_HalfI_Half(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 16); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_half *pIn = (cl_half *)gIn;
for (size_t j = 0; j < bufferElements; j++) pIn[j] = (cl_ushort)i + j;
Expand Down Expand Up @@ -206,8 +208,6 @@ int TestFunc_HalfI_Half(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
for (size_t j = 0; j < bufferElements; j++)
{
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/unary_u_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ int TestFunc_Double_ULong(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_ulong *p = (cl_ulong *)gIn;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(cl_ulong); j++)
Expand Down Expand Up @@ -157,8 +159,6 @@ int TestFunc_Double_ULong(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint64_t *t = (uint64_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(cl_double); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/unary_u_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ int TestFunc_Float_UInt(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
uint32_t *p = (uint32_t *)gIn;
if (gWimpyMode)
Expand Down Expand Up @@ -164,8 +166,6 @@ int TestFunc_Float_UInt(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
uint32_t *t = (uint32_t *)gOut_Ref;
for (size_t j = 0; j < BUFFER_SIZE / sizeof(float); j++)
Expand Down
4 changes: 2 additions & 2 deletions test_conformance/math_brute_force/unary_u_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ int TestFunc_Half_UShort(const Func *f, MTdata d, bool relaxedMode)

for (uint64_t i = 0; i < (1ULL << 32); i += step)
{
if (gSkipCorrectnessTesting) break;

// Init input array
cl_ushort *p = (cl_ushort *)gIn;
for (size_t j = 0; j < bufferElements; j++) p[j] = (uint16_t)i + j;
Expand Down Expand Up @@ -155,8 +157,6 @@ int TestFunc_Half_UShort(const Func *f, MTdata d, bool relaxedMode)
}
}

if (gSkipCorrectnessTesting) break;

// Verify data
cl_ushort *t = (cl_ushort *)gOut_Ref;
for (size_t j = 0; j < bufferElements; j++)
Expand Down
Loading