Skip to content

Commit

Permalink
Prepare fp16 tests for merging
Browse files Browse the repository at this point in the history
Update copyright headers, fixup whitespace, and remove unrelated
changes.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
  • Loading branch information
svenvh committed Jun 3, 2024
1 parent c6943ba commit 5d7bb2a
Show file tree
Hide file tree
Showing 35 changed files with 50 additions and 39 deletions.
2 changes: 1 addition & 1 deletion test_common/harness/rounding_mode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/conversions/basic_test_conversions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/conversions/basic_test_conversions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2023-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/conversions/conversions_data_info.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2023-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/conversions/test_conversions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/binary_half.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
6 changes: 4 additions & 2 deletions test_conformance/math_brute_force/binary_i_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,16 @@ const double specialValues[] = {
+0.0,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

const int specialValuesInt[] = {
0, 1, 2, 3, 1022, 1023, 1024, INT_MIN,
INT_MAX, -1, -2, -3, -1022, -1023, -11024, -INT_MAX,
};

constexpr size_t specialValuesIntCount = ARRAY_SIZE(specialValuesInt);
constexpr size_t specialValuesIntCount =
sizeof(specialValuesInt) / sizeof(specialValuesInt[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
Expand Down
7 changes: 5 additions & 2 deletions test_conformance/math_brute_force/binary_i_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ const float specialValues[] = {
+0.0f,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

const int specialValuesInt[] = {
0, 1, 2, 3, 126, 127,
Expand All @@ -193,7 +194,9 @@ const int specialValuesInt[] = {
-0x04000001, -1465264071, -1488522147,
};

constexpr size_t specialValuesIntCount = ARRAY_SIZE(specialValuesInt);
constexpr size_t specialValuesIntCount =
sizeof(specialValuesInt) / sizeof(specialValuesInt[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
TestInfo *job = (TestInfo *)data;
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
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/binary_operator_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ const double specialValues[] = {
+0.0,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/binary_operator_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ const float specialValues[] = {
+0.0f,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
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
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2022 The Khronos Group Inc.
// Copyright (c) 2022-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions test_conformance/math_brute_force/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2021 The Khronos Group Inc.
// Copyright (c) 2021-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -94,5 +94,4 @@ using SourceGenerator = std::string (*)(const std::string &kernel_name,
cl_int BuildKernels(BuildKernelInfo &info, cl_uint job_id,
SourceGenerator generator);


#endif /* COMMON_H */
4 changes: 3 additions & 1 deletion test_conformance/math_brute_force/function_list.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -235,6 +235,7 @@ static constexpr vtbl _mad_tbl = {

#endif // FUNCTION_LIST_ULPS_ONLY

// clang-format off
const Func functionList[] = {
ENTRY_EXT(acos, 4.0f, 4.0f, 2.0f, 4096.0f, FTZ_OFF, unaryF, 4096.0f),
ENTRY(acosh, 4.0f, 4.0f, 2.0f, FTZ_OFF, unaryF),
Expand Down Expand Up @@ -432,5 +433,6 @@ const Func functionList[] = {
unaryF), // A simple copy operation
OPERATOR_ENTRY(not, "!", 0.0f, 0.0f, 0.0f, FTZ_OFF, macro_unaryF),
};
// clang-format on

const size_t functionListCount = sizeof(functionList) / sizeof(functionList[0]);
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/function_list.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/i_unary_half.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/macro_binary_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ const double specialValues[] = {
+0.0,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/macro_binary_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ const float specialValues[] = {
+0.0f,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

cl_int Test(cl_uint job_id, cl_uint thread_id, void *data)
{
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/macro_binary_half.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/macro_unary_half.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/mad_half.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/reference_math.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions test_conformance/math_brute_force/reference_math.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,6 @@

#if defined(__APPLE__)
#include <OpenCL/opencl.h>

#else
#include <CL/cl.h>
#include "CL/cl_half.h"
Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/ternary_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ const double specialValues[] = {
+0.0,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

} // anonymous namespace

Expand Down
3 changes: 2 additions & 1 deletion test_conformance/math_brute_force/ternary_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ const float specialValues[] = {
+0.0f,
};

constexpr size_t specialValuesCount = ARRAY_SIZE(specialValues);
constexpr size_t specialValuesCount =
sizeof(specialValues) / sizeof(specialValues[0]);

} // anonymous namespace

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
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/test_functions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2021 The Khronos Group Inc.
// Copyright (c) 2021-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
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
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
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
@@ -1,5 +1,5 @@
//
// Copyright (c) 2023 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test_conformance/math_brute_force/utility.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017-2024 The Khronos Group Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 5d7bb2a

Please sign in to comment.