CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
570 lines
16 KiB
C++
570 lines
16 KiB
C++
/*
|
|
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include "half_precision_common.hh"
|
|
|
|
/**
|
|
* @addtogroup HalfPrecisionMath HalfPrecisionMath
|
|
* @{
|
|
* @ingroup MathTest
|
|
*/
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hcos);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hcos(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::cos(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hcos, static_cast<float (*)(float)>(std::cos),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2cos);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2cos(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::cos(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2cos, static_cast<float (*)(float)>(std::cos),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hsin);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hsin(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::sin(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hsin, static_cast<float (*)(float)>(std::sin),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2sin);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2sin(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::sin(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2sin, static_cast<float (*)(float)>(std::sin),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hexp);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hexp(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::exp(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hexp, static_cast<float (*)(float)>(std::exp),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2exp);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2exp(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::exp(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2exp, static_cast<float (*)(float)>(std::exp),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hexp10);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hexp10(x)` for all possible inputs. The results are
|
|
* compared against reference function `float exp10(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hexp10, static_cast<float (*)(float)>(exp10f),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2exp10);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2exp10(x)` for all possible inputs. The results are
|
|
* compared against reference function `float exp10(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2exp10, static_cast<float (*)(float)>(exp10f),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hexp2);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hexp2(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::exp2(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hexp2, static_cast<float (*)(float)>(std::exp2),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2exp2);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2exp2(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::exp2(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2exp2, static_cast<float (*)(float)>(std::exp2),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hlog);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hlog(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hlog, static_cast<float (*)(float)>(std::log),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2log);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2log(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2log, static_cast<float (*)(float)>(std::log),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hlog10);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hlog10(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log10(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hlog10, static_cast<float (*)(float)>(std::log10),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2log10);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2log10(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log10(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2log10, static_cast<float (*)(float)>(std::log10),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hlog2);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hlog2(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log2(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hlog2, static_cast<float (*)(float)>(std::log2),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2log2);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2log2(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::log2(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2log2, static_cast<float (*)(float)>(std::log2),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hsqrt);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hsqrt(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::sqrt(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hsqrt, static_cast<float (*)(float)>(std::sqrt),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2sqrt);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2sqrt(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::sqrt(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2sqrt, static_cast<float (*)(float)>(std::sqrt),
|
|
ULPValidatorBuilderFactory<Float16>(1));
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hceil);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hceil(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::ceil(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hceil, static_cast<float (*)(float)>(std::ceil),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2ceil);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2ceil(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::ceil(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2ceil, static_cast<float (*)(float)>(std::ceil),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hfloor);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hfloor(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::floor(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hfloor, static_cast<float (*)(float)>(std::floor),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2floor);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2floor(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::floor(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2floor, static_cast<float (*)(float)>(std::floor),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(htrunc);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `htrunc(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::trunc(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(htrunc, static_cast<float (*)(float)>(std::trunc),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2trunc);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2trunc(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::trunc(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2trunc, static_cast<float (*)(float)>(std::trunc),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
|
|
static float hrcp_ref(float x) { return 1.0f / x; }
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hrcp);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hrcp(x)` for all possible inputs.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hrcp, hrcp_ref, EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2rcp);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2rcp(x)` for all possible inputs.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2rcp, hrcp_ref, EqValidatorBuilderFactory<float>());
|
|
|
|
|
|
static float hrsqrt_ref(float x) { return 1.0f / std::sqrt(x); }
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hrsqrt);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hrsqrt(x)` for all possible inputs.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hrsqrt, hrsqrt_ref, EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2rsqrt);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2rsqrt(x)` for all possible inputs.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2rsqrt, hrsqrt_ref, EqValidatorBuilderFactory<float>());
|
|
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(hrint);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `hrint(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::rint(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(hrint, static_cast<float (*)(float)>(std::rint),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
MATH_UNARY_HP_KERNEL_DEF(h2rint);
|
|
|
|
/**
|
|
* Test Description
|
|
* ------------------------
|
|
* - Tests the numerical accuracy of `h2rint(x)` for all possible inputs. The results are
|
|
* compared against reference function `float std::rint(float)`.
|
|
*
|
|
* Test source
|
|
* ------------------------
|
|
* - unit/math/half_precision_math.cc
|
|
* Test requirements
|
|
* ------------------------
|
|
* - HIP_VERSION >= 5.2
|
|
*/
|
|
MATH_UNARY_HP_TEST_DEF_IMPL(h2rint, static_cast<float (*)(float)>(std::rint),
|
|
EqValidatorBuilderFactory<float>());
|
|
|
|
/**
|
|
* End doxygen group MathTest.
|
|
* @}
|
|
*/
|