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

[NFC] math_brute_force: use getAllowedUlpError for half #2086

Merged
merged 1 commit into from
Oct 29, 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
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/binary_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ int TestFunc_Half_Half_Half_common(const Func *f, MTdata d, int isNextafter,
}

test_info.f = f;
test_info.ulps = f->half_ulps;
test_info.ulps = getAllowedUlpError(f, khalf, relaxedMode);
test_info.ftz =
f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gHalfCapabilities);

Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/binary_i_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ int TestFunc_Half_Half_Int(const Func *f, MTdata d, bool relaxedMode)
}

test_info.f = f;
test_info.ulps = f->half_ulps;
test_info.ulps = getAllowedUlpError(f, khalf, relaxedMode);
test_info.ftz =
f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gHalfCapabilities);

Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/binary_operator_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ int TestFunc_Half_Half_Half_Operator(const Func *f, MTdata d, bool relaxedMode)
}

test_info.f = f;
test_info.ulps = f->half_ulps;
test_info.ulps = getAllowedUlpError(f, khalf, relaxedMode);
test_info.ftz =
f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gHalfCapabilities);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int TestFunc_HalfI_Half_Half(const Func *f, MTdata d, bool relaxedMode)

cl_uint threadCount = GetThreadCount();

float half_ulps = f->half_ulps;
float half_ulps = getAllowedUlpError(f, khalf, relaxedMode);

int testingRemquo = !strcmp(f->name, "remquo");

Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/ternary_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int TestFunc_Half_Half_Half_Half(const Func *f, MTdata d, bool relaxedMode)
constexpr size_t bufferElements = BUFFER_SIZE / sizeof(cl_half);

std::vector<cl_uchar> overflow(bufferElements);
float half_ulps = f->half_ulps;
float half_ulps = getAllowedUlpError(f, khalf, relaxedMode);
int skipNanInf = (0 == strcmp("fma", f->nameInCode));

logFunctionInfo(f->name, sizeof(cl_half), relaxedMode);
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/unary_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ int TestFunc_Half_Half(const Func *f, MTdata d, bool relaxedMode)
}

test_info.f = f;
test_info.ulps = f->half_ulps;
test_info.ulps = getAllowedUlpError(f, khalf, relaxedMode);
test_info.ftz =
f->ftz || gForceFTZ || 0 == (CL_FP_DENORM & gHalfCapabilities);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int TestFunc_Half2_Half(const Func *f, MTdata d, bool relaxedMode)

logFunctionInfo(f->name, sizeof(cl_half), relaxedMode);

float half_ulps = f->half_ulps;
float half_ulps = getAllowedUlpError(f, khalf, relaxedMode);

// Init the kernels
BuildKernelInfo build_info{ 1, kernels, programs, f->nameInCode };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int TestFunc_HalfI_Half(const Func *f, MTdata d, bool relaxedMode)

logFunctionInfo(f->name, sizeof(cl_half), relaxedMode);

float half_ulps = f->half_ulps;
float half_ulps = getAllowedUlpError(f, khalf, relaxedMode);

maxiError = half_ulps == INFINITY ? CL_ULONG_MAX : 0;

Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/unary_u_half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int TestFunc_Half_UShort(const Func *f, MTdata d, bool relaxedMode)
size_t bufferSize = bufferElements * sizeof(cl_half);
logFunctionInfo(f->name, sizeof(cl_half), relaxedMode);
const char *name = f->name;
float half_ulps = f->half_ulps;
float half_ulps = getAllowedUlpError(f, khalf, relaxedMode);

// Init the kernels
BuildKernelInfo build_info = { 1, kernels, programs, f->nameInCode };
Expand Down
Loading