mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +00:00
Reuse math_brute_force ulp threshold in spir test
Spir test compares floating-point kernel results bit-by-bit with correct results. However, for math_brute_force kernels, specification does not ask for SPIR and OpenCL C path to match bit-to-bit. This patch reuses ulps threshold from math_brute_force folder for math_brute_force kernels in spir test. Signed-off-by: Wenju He <wenju.he@intel.com>
This commit is contained in:
committed by
Alastair Murray
parent
f0289e2077
commit
e4a2f1e326
@@ -24,6 +24,36 @@
|
||||
|
||||
#define STRINGIFY( _s) #_s
|
||||
|
||||
// Only use ulps information in spir test
|
||||
#ifdef FUNCTION_LIST_ULPS_ONLY
|
||||
|
||||
#define ENTRY( _name, _ulp, _embedded_ulp, _rmode, _type ) { STRINGIFY(_name), STRINGIFY(_name), {NULL}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
#define ENTRY_EXT( _name, _ulp, _embedded_ulp, _relaxed_ulp, _rmode, _type ) { STRINGIFY(_name), STRINGIFY(_name), {NULL}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, _relaxed_ulp, _rmode, RELAXED_ON, _type }
|
||||
#define HALF_ENTRY( _name, _ulp, _embedded_ulp, _rmode, _type ) { "half_" STRINGIFY(_name), "half_" STRINGIFY(_name), {NULL}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
#define OPERATOR_ENTRY(_name, _operator, _ulp, _embedded_ulp, _rmode, _type) { STRINGIFY(_name), _operator, {NULL}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
#define unaryF NULL
|
||||
#define i_unaryF NULL
|
||||
#define unaryF_u NULL
|
||||
#define macro_unaryF NULL
|
||||
#define binaryF NULL
|
||||
#define binaryF_nextafter NULL
|
||||
#define binaryOperatorF NULL
|
||||
#define binaryF_i NULL
|
||||
#define macro_binaryF NULL
|
||||
#define ternaryF NULL
|
||||
#define unaryF_two_results NULL
|
||||
#define unaryF_two_results_i NULL
|
||||
#define binaryF_two_results_i NULL
|
||||
#define mad_function NULL
|
||||
|
||||
#define reference_sqrt NULL
|
||||
#define reference_sqrtl NULL
|
||||
#define reference_divide NULL
|
||||
#define reference_dividel NULL
|
||||
#define reference_relaxed_divide NULL
|
||||
|
||||
#else // FUNCTION_LIST_ULPS_ONLY
|
||||
|
||||
#define ENTRY( _name, _ulp, _embedded_ulp, _rmode, _type ) { STRINGIFY(_name), STRINGIFY(_name), {(void*)reference_##_name}, {(void*)reference_##_name##l}, {(void*)reference_##_name}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
#define ENTRY_EXT( _name, _ulp, _embedded_ulp, _relaxed_ulp, _rmode, _type ) { STRINGIFY(_name), STRINGIFY(_name), {(void*)reference_##_name}, {(void*)reference_##_name##l}, {(void*)reference_##relaxed_##_name}, _ulp, _ulp, _embedded_ulp, _relaxed_ulp, _rmode, RELAXED_ON, _type }
|
||||
#define HALF_ENTRY( _name, _ulp, _embedded_ulp, _rmode, _type ) { "half_" STRINGIFY(_name), "half_" STRINGIFY(_name), {(void*)reference_##_name}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
@@ -65,6 +95,7 @@ extern const vtbl _mad_tbl; // float mad( float, float, float )
|
||||
#define binaryF_two_results_i &_binary_two_results_i
|
||||
#define mad_function &_mad_tbl
|
||||
|
||||
#endif // FUNCTION_LIST_ULPS_ONLY
|
||||
|
||||
const Func functionList[] = {
|
||||
ENTRY( acos, 4.0f, 4.0f, FTZ_OFF, unaryF),
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
#include "../../test_common/harness/mt19937.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef union fptr
|
||||
{
|
||||
void *p;
|
||||
@@ -93,6 +97,9 @@ extern const Func functionList[];
|
||||
|
||||
extern const size_t functionListCount;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user