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
66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <hip_test_kernels.hh>
|
|
#include <hip_test_checkers.hh>
|
|
#include <hip_test_common.hh>
|
|
|
|
#pragma GCC diagnostic ignored "-Wall"
|
|
#pragma clang diagnostic ignored "-Wunused-variable"
|
|
|
|
__device__ void double_precision_intrinsics() {
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__dadd_rd(0.0, 1.0);
|
|
#endif
|
|
__dadd_rn(0.0, 1.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__dadd_ru(0.0, 1.0);
|
|
__dadd_rz(0.0, 1.0);
|
|
__ddiv_rd(0.0, 1.0);
|
|
#endif
|
|
__ddiv_rn(0.0, 1.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__ddiv_ru(0.0, 1.0);
|
|
__ddiv_rz(0.0, 1.0);
|
|
__dmul_rd(1.0, 2.0);
|
|
#endif
|
|
__dmul_rn(1.0, 2.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__dmul_ru(1.0, 2.0);
|
|
__dmul_rz(1.0, 2.0);
|
|
__drcp_rd(2.0);
|
|
#endif
|
|
__drcp_rn(2.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__drcp_ru(2.0);
|
|
__drcp_rz(2.0);
|
|
__dsqrt_rd(4.0);
|
|
#endif
|
|
__dsqrt_rn(4.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__dsqrt_ru(4.0);
|
|
__dsqrt_rz(4.0);
|
|
__dsub_rd(2.0, 1.0);
|
|
#endif
|
|
__dsub_rn(2.0, 1.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__dsub_ru(2.0, 1.0);
|
|
__dsub_rz(2.0, 1.0);
|
|
__fma_rd(1.0, 2.0, 3.0);
|
|
#endif
|
|
__fma_rn(1.0, 2.0, 3.0);
|
|
#if defined OCML_BASIC_ROUNDED_OPERATIONS
|
|
__fma_ru(1.0, 2.0, 3.0);
|
|
__fma_rz(1.0, 2.0, 3.0);
|
|
#endif
|
|
}
|
|
|
|
__global__ void compileDoublePrecisionIntrinsics(int) { double_precision_intrinsics(); }
|
|
|
|
HIP_TEST_CASE(Unit_DoublePrecisionIntrinsics) {
|
|
hipLaunchKernelGGL(compileDoublePrecisionIntrinsics, dim3(1, 1, 1), dim3(1, 1, 1), 0, 0, 1);
|
|
}
|