mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
subgroups: Fix setting cl_halfs and progress check. (#1278)
* subgroups: Fix setting cl_halfs and progress check. cl_float testing uses set_value such that a generated cl_ulong of 1 is stored as 1.0F in a logical sense. However, cl_half values aren't intrinsic to C++ and generated cl_ulongs less than 1024 in particular are interpreted bitwise as subnormals. The test fails on compute devices lacking subnormal support. Perform the logical conversion to cl_half. Fix independent forward progress check. * subgroups_half: Address review comments * subgroups_half: Formatting fixes required by check-format * subgroups_half: Modified to query and use rounding mode supported by device Co-authored-by: spauls <spauls@qti.qualcomm.com>
This commit is contained in:
committed by
GitHub
parent
12637114ac
commit
79f692d8e5
@@ -28,6 +28,7 @@
|
||||
#define NR_OF_ACTIVE_WORK_ITEMS 4
|
||||
|
||||
extern MTdata gMTdata;
|
||||
extern cl_half_rounding_mode g_rounding_mode;
|
||||
|
||||
struct WorkGroupParams
|
||||
{
|
||||
@@ -1080,7 +1081,7 @@ template <typename Ty>
|
||||
typename std::enable_if<TypeManager<Ty>::is_sb_scalar_type::value>::type
|
||||
set_value(Ty &lhs, const cl_ulong &rhs)
|
||||
{
|
||||
lhs.data = rhs;
|
||||
lhs.data = cl_half_from_float(static_cast<cl_float>(rhs), g_rounding_mode);
|
||||
}
|
||||
|
||||
// compare for common vectors
|
||||
|
||||
Reference in New Issue
Block a user