mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Added cl_khr_fp16 extension support for test_explicit_s2v from basic (#1713)
* Added cl_khr_fp16 support for test_explicit_s2v from basic (issue #142, basic) * Cosmetic corrections * cosmetic fix * Added correction to distinguish signed and unsigned char types for ARM architecture tests * Added missing pieces of convertion procedure to support half * Corrected condition to verify if additional pragma is necessary (issue #142, basic) * Add NaN check for half to float conversion * check-format fixes * Add NaN check for all float types Use std::isnan for float/double types. Change-Id: I005bddccaa3f8490ac59b2aa431ed315733ad143 * Fix Ubuntu build error with isnan macro definition Change-Id: I671ed826a9631fbbc66d0aa9b674ab00124c7967 * Check format fixes * NAN define not needed anymore --------- Co-authored-by: Vasu Penugonda <vpenugon@qti.qualcomm.com> Co-authored-by: Sreelakshmi Haridas <sharidas@quicinc.com>
This commit is contained in:
@@ -33,7 +33,11 @@
|
||||
|
||||
#include "procs.h"
|
||||
|
||||
static const char *fp_kernel_code = R"(
|
||||
extern cl_half_rounding_mode halfRoundingMode;
|
||||
|
||||
namespace {
|
||||
|
||||
const char *fp_kernel_code = R"(
|
||||
%s
|
||||
__kernel void test_fp(__global TYPE *srcA, __global TYPE *srcB, __global TYPE *dst)
|
||||
{
|
||||
@@ -42,8 +46,6 @@ __kernel void test_fp(__global TYPE *srcA, __global TYPE *srcB, __global TYPE *d
|
||||
dst[tid] = srcA[tid] OP srcB[tid];
|
||||
})";
|
||||
|
||||
extern cl_half_rounding_mode halfRoundingMode;
|
||||
|
||||
#define HFF(num) cl_half_from_float(num, halfRoundingMode)
|
||||
#define HTF(num) cl_half_to_float(num)
|
||||
|
||||
@@ -370,6 +372,8 @@ protected:
|
||||
std::map<size_t, std::string> type2name;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
int test_fpmath(cl_device_id device, cl_context context, cl_command_queue queue,
|
||||
int num_elements)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user