summaryrefslogtreecommitdiff
path: root/libc/src/math/amdgpu
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2025-06-08 22:50:59 -0700
committerAmir Ayupov <aaupov@fb.com>2025-06-08 22:50:59 -0700
commiteb1dd48b4ab79e29e82bd396c01b4a7cc83bbd81 (patch)
treead446efb8062977bcf328af58cdc7fcd47864af2 /libc/src/math/amdgpu
parent81f92265327a8cf6e730ad1d01fd02f4ef76ed86 (diff)
parent03bbd04bb7ae40dcda7b8bf1d6d09f63191503b0 (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.boltnfci-simplify-dataaggregator-using-traces-1
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'libc/src/math/amdgpu')
-rw-r--r--libc/src/math/amdgpu/CMakeLists.txt168
-rw-r--r--libc/src/math/amdgpu/acos.cpp19
-rw-r--r--libc/src/math/amdgpu/acosf.cpp19
-rw-r--r--libc/src/math/amdgpu/acosh.cpp19
-rw-r--r--libc/src/math/amdgpu/acoshf.cpp19
-rw-r--r--libc/src/math/amdgpu/asin.cpp19
-rw-r--r--libc/src/math/amdgpu/asinf.cpp19
-rw-r--r--libc/src/math/amdgpu/asinh.cpp19
-rw-r--r--libc/src/math/amdgpu/asinhf.cpp19
-rw-r--r--libc/src/math/amdgpu/atan.cpp19
-rw-r--r--libc/src/math/amdgpu/atan2.cpp21
-rw-r--r--libc/src/math/amdgpu/atan2f.cpp21
-rw-r--r--libc/src/math/amdgpu/atanf.cpp19
-rw-r--r--libc/src/math/amdgpu/atanh.cpp19
-rw-r--r--libc/src/math/amdgpu/atanhf.cpp19
-rw-r--r--libc/src/math/amdgpu/cos.cpp19
-rw-r--r--libc/src/math/amdgpu/cosf.cpp19
-rw-r--r--libc/src/math/amdgpu/cosh.cpp19
-rw-r--r--libc/src/math/amdgpu/coshf.cpp19
-rw-r--r--libc/src/math/amdgpu/declarations.h91
-rw-r--r--libc/src/math/amdgpu/erf.cpp19
-rw-r--r--libc/src/math/amdgpu/erff.cpp19
-rw-r--r--libc/src/math/amdgpu/exp.cpp19
-rw-r--r--libc/src/math/amdgpu/exp10.cpp19
-rw-r--r--libc/src/math/amdgpu/exp10f.cpp19
-rw-r--r--libc/src/math/amdgpu/exp2.cpp19
-rw-r--r--libc/src/math/amdgpu/exp2f.cpp19
-rw-r--r--libc/src/math/amdgpu/expf.cpp19
-rw-r--r--libc/src/math/amdgpu/expm1.cpp19
-rw-r--r--libc/src/math/amdgpu/expm1f.cpp19
-rw-r--r--libc/src/math/amdgpu/fdim.cpp21
-rw-r--r--libc/src/math/amdgpu/fdimf.cpp21
-rw-r--r--libc/src/math/amdgpu/frexp.cpp1
-rw-r--r--libc/src/math/amdgpu/frexpf.cpp1
-rw-r--r--libc/src/math/amdgpu/hypot.cpp21
-rw-r--r--libc/src/math/amdgpu/hypotf.cpp21
-rw-r--r--libc/src/math/amdgpu/ilogb.cpp19
-rw-r--r--libc/src/math/amdgpu/ilogbf.cpp19
-rw-r--r--libc/src/math/amdgpu/ldexp.cpp1
-rw-r--r--libc/src/math/amdgpu/ldexpf.cpp1
-rw-r--r--libc/src/math/amdgpu/lgamma.cpp4
-rw-r--r--libc/src/math/amdgpu/lgamma_r.cpp9
-rw-r--r--libc/src/math/amdgpu/llrint.cpp1
-rw-r--r--libc/src/math/amdgpu/llrintf.cpp1
-rw-r--r--libc/src/math/amdgpu/log.cpp19
-rw-r--r--libc/src/math/amdgpu/log10.cpp19
-rw-r--r--libc/src/math/amdgpu/log10f.cpp19
-rw-r--r--libc/src/math/amdgpu/log1p.cpp19
-rw-r--r--libc/src/math/amdgpu/log1pf.cpp19
-rw-r--r--libc/src/math/amdgpu/log2.cpp19
-rw-r--r--libc/src/math/amdgpu/log2f.cpp19
-rw-r--r--libc/src/math/amdgpu/logb.cpp19
-rw-r--r--libc/src/math/amdgpu/logbf.cpp19
-rw-r--r--libc/src/math/amdgpu/logf.cpp19
-rw-r--r--libc/src/math/amdgpu/lrint.cpp1
-rw-r--r--libc/src/math/amdgpu/lrintf.cpp1
-rw-r--r--libc/src/math/amdgpu/nextafter.cpp21
-rw-r--r--libc/src/math/amdgpu/nextafterf.cpp21
-rw-r--r--libc/src/math/amdgpu/platform.h55
-rw-r--r--libc/src/math/amdgpu/powf.cpp21
-rw-r--r--libc/src/math/amdgpu/powi.cpp21
-rw-r--r--libc/src/math/amdgpu/powif.cpp21
-rw-r--r--libc/src/math/amdgpu/remquo.cpp24
-rw-r--r--libc/src/math/amdgpu/remquof.cpp24
-rw-r--r--libc/src/math/amdgpu/scalbn.cpp1
-rw-r--r--libc/src/math/amdgpu/scalbnf.cpp1
-rw-r--r--libc/src/math/amdgpu/sin.cpp19
-rw-r--r--libc/src/math/amdgpu/sincos.cpp21
-rw-r--r--libc/src/math/amdgpu/sincosf.cpp21
-rw-r--r--libc/src/math/amdgpu/sinf.cpp19
-rw-r--r--libc/src/math/amdgpu/sinh.cpp19
-rw-r--r--libc/src/math/amdgpu/sinhf.cpp19
-rw-r--r--libc/src/math/amdgpu/tan.cpp19
-rw-r--r--libc/src/math/amdgpu/tanf.cpp19
-rw-r--r--libc/src/math/amdgpu/tanh.cpp19
-rw-r--r--libc/src/math/amdgpu/tanhf.cpp19
-rw-r--r--libc/src/math/amdgpu/tgamma.cpp3
-rw-r--r--libc/src/math/amdgpu/tgammaf.cpp3
78 files changed, 7 insertions, 1531 deletions
diff --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 23fd3169fddf..e2cd3b99c303 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -1,21 +1,3 @@
-# Math functions not yet available in the libc project, or those not yet tuned
-# for GPU workloads are provided as wrappers over vendor libraries. If we find
-# them ahead of time we will import them statically. Otherwise, we will keep
-# them as external references and expect them to be resolved by the user when
-# they compile. In the future,we will use implementations from the 'libc'
-# project and not provide these wrappers.
-find_package(AMDDeviceLibs QUIET HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
-if(AMDDeviceLibs_FOUND)
- message(STATUS "Found the ROCm device library. Implementations falling back "
- "to the vendor libraries will be resolved statically.")
- get_target_property(ocml_path ocml IMPORTED_LOCATION)
- set(bitcode_link_flags
- "SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${ocml_path}")
-else()
- message(STATUS "Could not find the ROCm device library. Unimplemented "
- "functions will be an external reference to the vendor libraries.")
-endif()
-
add_entrypoint_object(
ceil
SRCS
@@ -346,152 +328,6 @@ add_entrypoint_object(
-O2
)
-# The following functions currently are not implemented natively and borrow from
-# existing implementations. This will be removed in the future.
-add_entrypoint_object(
- acos
- SRCS
- acos.cpp
- HDRS
- ../acos.h
- VENDOR
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
-)
-
-add_entrypoint_object(
- acosh
- SRCS
- acosh.cpp
- HDRS
- ../acosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asin
- SRCS
- asin.cpp
- HDRS
- ../asin.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- asinh
- SRCS
- asinh.cpp
- HDRS
- ../asinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atan
- SRCS
- atan.cpp
- HDRS
- ../atan.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- atanh
- SRCS
- atanh.cpp
- HDRS
- ../atanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- cosh
- SRCS
- cosh.cpp
- HDRS
- ../cosh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- erf
- SRCS
- erf.cpp
- HDRS
- ../erf.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powi
- SRCS
- powi.cpp
- HDRS
- ../powi.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- powif
- SRCS
- powif.cpp
- HDRS
- ../powif.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- sinh
- SRCS
- sinh.cpp
- HDRS
- ../sinh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
-add_entrypoint_object(
- tanh
- SRCS
- tanh.cpp
- HDRS
- ../tanh.h
- COMPILE_OPTIONS
- ${bitcode_link_flags}
- -O2
- VENDOR
-)
-
add_entrypoint_object(
tgamma
SRCS
@@ -501,7 +337,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -513,7 +348,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -525,7 +359,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
add_entrypoint_object(
@@ -537,5 +370,4 @@ add_entrypoint_object(
COMPILE_OPTIONS
${bitcode_link_flags}
-O2
- VENDOR
)
diff --git a/libc/src/math/amdgpu/acos.cpp b/libc/src/math/amdgpu/acos.cpp
deleted file mode 100644
index de870f207326..000000000000
--- a/libc/src/math/amdgpu/acos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acos function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acos, (double x)) { return __ocml_acos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosf.cpp b/libc/src/math/amdgpu/acosf.cpp
deleted file mode 100644
index 0a72a70a3ee9..000000000000
--- a/libc/src/math/amdgpu/acosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acosf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __ocml_acos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acosh.cpp b/libc/src/math/amdgpu/acosh.cpp
deleted file mode 100644
index 15c973449983..000000000000
--- a/libc/src/math/amdgpu/acosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acosh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acosh, (double x)) { return __ocml_acosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/acoshf.cpp b/libc/src/math/amdgpu/acoshf.cpp
deleted file mode 100644
index 79e71b02e719..000000000000
--- a/libc/src/math/amdgpu/acoshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acoshf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acoshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acoshf, (float x)) { return __ocml_acosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asin.cpp b/libc/src/math/amdgpu/asin.cpp
deleted file mode 100644
index a79641e1977c..000000000000
--- a/libc/src/math/amdgpu/asin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asin function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asin, (double x)) { return __ocml_asin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinf.cpp b/libc/src/math/amdgpu/asinf.cpp
deleted file mode 100644
index e70944a4d989..000000000000
--- a/libc/src/math/amdgpu/asinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinf, (float x)) { return __ocml_asin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinh.cpp b/libc/src/math/amdgpu/asinh.cpp
deleted file mode 100644
index 642368592a99..000000000000
--- a/libc/src/math/amdgpu/asinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asinh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asinh, (double x)) { return __ocml_asinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/asinhf.cpp b/libc/src/math/amdgpu/asinhf.cpp
deleted file mode 100644
index bafa77f94600..000000000000
--- a/libc/src/math/amdgpu/asinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinhf, (float x)) { return __ocml_asinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan.cpp b/libc/src/math/amdgpu/atan.cpp
deleted file mode 100644
index 49941e97096f..000000000000
--- a/libc/src/math/amdgpu/atan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atan function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan, (double x)) { return __ocml_atan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2.cpp b/libc/src/math/amdgpu/atan2.cpp
deleted file mode 100644
index f5907504cb36..000000000000
--- a/libc/src/math/amdgpu/atan2.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan2, (double x, double y)) {
- return __ocml_atan2_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atan2f.cpp b/libc/src/math/amdgpu/atan2f.cpp
deleted file mode 100644
index 736c77d1cbce..000000000000
--- a/libc/src/math/amdgpu/atan2f.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atan2f, (float x, float y)) {
- return __ocml_atan2_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atanf.cpp b/libc/src/math/amdgpu/atanf.cpp
deleted file mode 100644
index ab1837dd026b..000000000000
--- a/libc/src/math/amdgpu/atanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanf, (float x)) { return __ocml_atan_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atanh.cpp b/libc/src/math/amdgpu/atanh.cpp
deleted file mode 100644
index 091c155190f9..000000000000
--- a/libc/src/math/amdgpu/atanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atanh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atanh, (double x)) { return __ocml_atanh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/atanhf.cpp b/libc/src/math/amdgpu/atanhf.cpp
deleted file mode 100644
index fa9cf3938396..000000000000
--- a/libc/src/math/amdgpu/atanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanhf, (float x)) { return __ocml_atanh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/cos.cpp b/libc/src/math/amdgpu/cos.cpp
deleted file mode 100644
index a4d4c94dd7ac..000000000000
--- a/libc/src/math/amdgpu/cos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cos function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cos, (double x)) { return __ocml_cos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/cosf.cpp b/libc/src/math/amdgpu/cosf.cpp
deleted file mode 100644
index 99ec1185a834..000000000000
--- a/libc/src/math/amdgpu/cosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, cosf, (float x)) { return __ocml_cos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/cosh.cpp b/libc/src/math/amdgpu/cosh.cpp
deleted file mode 100644
index d94d7af25126..000000000000
--- a/libc/src/math/amdgpu/cosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cosh, (double x)) { return __ocml_cosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/coshf.cpp b/libc/src/math/amdgpu/coshf.cpp
deleted file mode 100644
index 5b641be27818..000000000000
--- a/libc/src/math/amdgpu/coshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the coshf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/coshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, coshf, (float x)) { return __ocml_cosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/declarations.h b/libc/src/math/amdgpu/declarations.h
deleted file mode 100644
index 88e2201521b6..000000000000
--- a/libc/src/math/amdgpu/declarations.h
+++ /dev/null
@@ -1,91 +0,0 @@
-//===-- AMDGPU specific declarations for math support ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H
-#define LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H
-
-#include "platform.h"
-
-#include "src/__support/GPU/utils.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-extern "C" {
-float __ocml_acos_f32(float);
-double __ocml_acos_f64(double);
-float __ocml_acosh_f32(float);
-double __ocml_acosh_f64(double);
-float __ocml_asin_f32(float);
-double __ocml_asin_f64(double);
-float __ocml_asinh_f32(float);
-double __ocml_asinh_f64(double);
-float __ocml_atan_f32(float);
-double __ocml_atan_f64(double);
-float __ocml_atan2_f32(float, float);
-double __ocml_atan2_f64(double, double);
-float __ocml_atanh_f32(float);
-double __ocml_atanh_f64(double);
-float __ocml_cos_f32(float);
-double __ocml_cos_f64(double);
-float __ocml_cosh_f32(float);
-double __ocml_cosh_f64(double);
-float __ocml_erf_f32(float);
-double __ocml_erf_f64(double);
-float __ocml_exp_f32(float);
-double __ocml_exp_f64(double);
-float __ocml_exp2_f32(float);
-double __ocml_exp2_f64(double);
-float __ocml_exp10_f32(float);
-double __ocml_exp10_f64(double);
-double __ocml_exp2_f64(double);
-float __ocml_expm1_f32(float);
-double __ocml_expm1_f64(double);
-float __ocml_fdim_f32(float, float);
-double __ocml_fdim_f64(double, double);
-float __ocml_hypot_f32(float, float);
-double __ocml_hypot_f64(double, double);
-int __ocml_ilogb_f64(double);
-int __ocml_ilogb_f32(float);
-float __ocml_ldexp_f32(float, int);
-double __ocml_ldexp_f64(double, int);
-float __ocml_log10_f32(float);
-double __ocml_log10_f64(double);
-float __ocml_log1p_f32(float);
-double __ocml_log1p_f64(double);
-float __ocml_log2_f32(float);
-double __ocml_log2_f64(double);
-float __ocml_log_f32(float);
-double __ocml_log_f64(double);
-float __ocml_nextafter_f32(float, float);
-double __ocml_nextafter_f64(double, double);
-float __ocml_pow_f32(float, float);
-double __ocml_pow_f64(double, double);
-float __ocml_pown_f32(float, int);
-double __ocml_pown_f64(double, int);
-float __ocml_sin_f32(float);
-double __ocml_sin_f64(double);
-float __ocml_sincos_f32(float, float *);
-double __ocml_sincos_f64(double, double *);
-float __ocml_sinh_f32(float);
-double __ocml_sinh_f64(double);
-float __ocml_tan_f32(float);
-double __ocml_tan_f64(double);
-float __ocml_tanh_f32(float);
-double __ocml_tanh_f64(double);
-float __ocml_remquo_f32(float, float, gpu::Private<int> *);
-double __ocml_remquo_f64(double, double, gpu::Private<int> *);
-double __ocml_tgamma_f64(double);
-float __ocml_tgamma_f32(float);
-double __ocml_lgamma_f64(double);
-double __ocml_lgamma_r_f64(double, gpu::Private<int> *);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H
diff --git a/libc/src/math/amdgpu/erf.cpp b/libc/src/math/amdgpu/erf.cpp
deleted file mode 100644
index 07ae268ff2cd..000000000000
--- a/libc/src/math/amdgpu/erf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erf function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, erf, (double x)) { return __ocml_erf_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/erff.cpp b/libc/src/math/amdgpu/erff.cpp
deleted file mode 100644
index a4b7b275cfcc..000000000000
--- a/libc/src/math/amdgpu/erff.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erff function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erff.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, erff, (float x)) { return __ocml_erf_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/exp.cpp b/libc/src/math/amdgpu/exp.cpp
deleted file mode 100644
index dae79bec5599..000000000000
--- a/libc/src/math/amdgpu/exp.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp, (double x)) { return __ocml_exp_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/exp10.cpp b/libc/src/math/amdgpu/exp10.cpp
deleted file mode 100644
index f13d218ca88c..000000000000
--- a/libc/src/math/amdgpu/exp10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp10, (double x)) { return __ocml_exp10_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/exp10f.cpp b/libc/src/math/amdgpu/exp10f.cpp
deleted file mode 100644
index 883e734e0687..000000000000
--- a/libc/src/math/amdgpu/exp10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp10f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp10f, (float x)) { return __ocml_exp10_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/exp2.cpp b/libc/src/math/amdgpu/exp2.cpp
deleted file mode 100644
index fb336cf48f15..000000000000
--- a/libc/src/math/amdgpu/exp2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp2, (double x)) { return __ocml_exp2_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/exp2f.cpp b/libc/src/math/amdgpu/exp2f.cpp
deleted file mode 100644
index 77b4a9c3b86e..000000000000
--- a/libc/src/math/amdgpu/exp2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp2f function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp2f, (float x)) { return __ocml_exp2_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/expf.cpp b/libc/src/math/amdgpu/expf.cpp
deleted file mode 100644
index 6c44aad164bf..000000000000
--- a/libc/src/math/amdgpu/expf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expf, (float x)) { return __ocml_exp_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/expm1.cpp b/libc/src/math/amdgpu/expm1.cpp
deleted file mode 100644
index df3643f9c78b..000000000000
--- a/libc/src/math/amdgpu/expm1.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU expm1 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, expm1, (double x)) { return __ocml_expm1_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/expm1f.cpp b/libc/src/math/amdgpu/expm1f.cpp
deleted file mode 100644
index 2409997f479c..000000000000
--- a/libc/src/math/amdgpu/expm1f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expm1f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expm1f, (float x)) { return __ocml_expm1_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/fdim.cpp b/libc/src/math/amdgpu/fdim.cpp
deleted file mode 100644
index 8ade0b21503b..000000000000
--- a/libc/src/math/amdgpu/fdim.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdim function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdim.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, fdim, (double x, double y)) {
- return __ocml_fdim_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/fdimf.cpp b/libc/src/math/amdgpu/fdimf.cpp
deleted file mode 100644
index ed3855e5ce2d..000000000000
--- a/libc/src/math/amdgpu/fdimf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdimf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdimf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, fdimf, (float x, float y)) {
- return __ocml_fdim_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/frexp.cpp b/libc/src/math/amdgpu/frexp.cpp
index 00e5187c0c71..4ae2b00198ec 100644
--- a/libc/src/math/amdgpu/frexp.cpp
+++ b/libc/src/math/amdgpu/frexp.cpp
@@ -9,7 +9,6 @@
#include "src/math/frexp.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/frexpf.cpp b/libc/src/math/amdgpu/frexpf.cpp
index 2799e542efae..fd53f65701f5 100644
--- a/libc/src/math/amdgpu/frexpf.cpp
+++ b/libc/src/math/amdgpu/frexpf.cpp
@@ -9,7 +9,6 @@
#include "src/math/frexpf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/hypot.cpp b/libc/src/math/amdgpu/hypot.cpp
deleted file mode 100644
index dcf1152a7516..000000000000
--- a/libc/src/math/amdgpu/hypot.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypot function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypot.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, hypot, (double x, double y)) {
- return __ocml_hypot_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/hypotf.cpp b/libc/src/math/amdgpu/hypotf.cpp
deleted file mode 100644
index 68ec659d12e5..000000000000
--- a/libc/src/math/amdgpu/hypotf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypotf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypotf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, hypotf, (float x, float y)) {
- return __ocml_hypot_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/ilogb.cpp b/libc/src/math/amdgpu/ilogb.cpp
deleted file mode 100644
index 37f24dfd8c39..000000000000
--- a/libc/src/math/amdgpu/ilogb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogb function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogb, (double x)) { return __ocml_ilogb_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/ilogbf.cpp b/libc/src/math/amdgpu/ilogbf.cpp
deleted file mode 100644
index 56e74e1575f1..000000000000
--- a/libc/src/math/amdgpu/ilogbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogbf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogbf, (float x)) { return __ocml_ilogb_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/ldexp.cpp b/libc/src/math/amdgpu/ldexp.cpp
index 393eabb84e61..5b786a9b21e7 100644
--- a/libc/src/math/amdgpu/ldexp.cpp
+++ b/libc/src/math/amdgpu/ldexp.cpp
@@ -9,7 +9,6 @@
#include "src/math/ldexp.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/ldexpf.cpp b/libc/src/math/amdgpu/ldexpf.cpp
index 970603dd170e..d3aa77fe592c 100644
--- a/libc/src/math/amdgpu/ldexpf.cpp
+++ b/libc/src/math/amdgpu/ldexpf.cpp
@@ -9,7 +9,6 @@
#include "src/math/ldexpf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/lgamma.cpp b/libc/src/math/amdgpu/lgamma.cpp
index acff4c76734e..9666927e60c4 100644
--- a/libc/src/math/amdgpu/lgamma.cpp
+++ b/libc/src/math/amdgpu/lgamma.cpp
@@ -9,11 +9,11 @@
#include "src/math/lgamma.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(double, lgamma, (double x)) { return __ocml_lgamma_f64(x); }
+// TODO: Implement this.
+LLVM_LIBC_FUNCTION(double, lgamma, (double)) { return 0.0; }
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/lgamma_r.cpp b/libc/src/math/amdgpu/lgamma_r.cpp
index 0a79988d66e3..8b69ca349456 100644
--- a/libc/src/math/amdgpu/lgamma_r.cpp
+++ b/libc/src/math/amdgpu/lgamma_r.cpp
@@ -9,16 +9,13 @@
#include "src/math/lgamma_r.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(double, lgamma_r, (double x, int *signp)) {
- int tmp = *signp;
- double r = __ocml_lgamma_r_f64(x, (gpu::Private<int> *)&tmp);
- *signp = tmp;
- return r;
+LLVM_LIBC_FUNCTION(double, lgamma_r, (double, int *signp)) {
+ *signp = 0;
+ return 0;
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/llrint.cpp b/libc/src/math/amdgpu/llrint.cpp
index 21129fe80a0c..6e0f57a5a038 100644
--- a/libc/src/math/amdgpu/llrint.cpp
+++ b/libc/src/math/amdgpu/llrint.cpp
@@ -9,7 +9,6 @@
#include "src/math/llrint.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/llrintf.cpp b/libc/src/math/amdgpu/llrintf.cpp
index a6f9f4387601..d8de23fac3c8 100644
--- a/libc/src/math/amdgpu/llrintf.cpp
+++ b/libc/src/math/amdgpu/llrintf.cpp
@@ -9,7 +9,6 @@
#include "src/math/llrintf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/log.cpp b/libc/src/math/amdgpu/log.cpp
deleted file mode 100644
index bd01adfa08a4..000000000000
--- a/libc/src/math/amdgpu/log.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log, (double x)) { return __ocml_log_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log10.cpp b/libc/src/math/amdgpu/log10.cpp
deleted file mode 100644
index 75957c9aeb50..000000000000
--- a/libc/src/math/amdgpu/log10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log10, (double x)) { return __ocml_log10_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log10f.cpp b/libc/src/math/amdgpu/log10f.cpp
deleted file mode 100644
index 9c12d6b11bcf..000000000000
--- a/libc/src/math/amdgpu/log10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log10f, (float x)) { return __ocml_log10_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log1p.cpp b/libc/src/math/amdgpu/log1p.cpp
deleted file mode 100644
index fc275196830f..000000000000
--- a/libc/src/math/amdgpu/log1p.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1p function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1p.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log1p, (double x)) { return __ocml_log1p_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log1pf.cpp b/libc/src/math/amdgpu/log1pf.cpp
deleted file mode 100644
index b2d26fb1166f..000000000000
--- a/libc/src/math/amdgpu/log1pf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1pf function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1pf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log1pf, (float x)) { return __ocml_log1p_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log2.cpp b/libc/src/math/amdgpu/log2.cpp
deleted file mode 100644
index 73f34b65a32f..000000000000
--- a/libc/src/math/amdgpu/log2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log2, (double x)) { return __ocml_log2_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/log2f.cpp b/libc/src/math/amdgpu/log2f.cpp
deleted file mode 100644
index 3b62edacfa65..000000000000
--- a/libc/src/math/amdgpu/log2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2f function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log2f, (float x)) { return __ocml_log2_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/logb.cpp b/libc/src/math/amdgpu/logb.cpp
deleted file mode 100644
index 4b68e281be87..000000000000
--- a/libc/src/math/amdgpu/logb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logb function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, logb, (double x)) { return __ocml_logb_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/logbf.cpp b/libc/src/math/amdgpu/logbf.cpp
deleted file mode 100644
index bc7c462c7f92..000000000000
--- a/libc/src/math/amdgpu/logbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logbf function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logbf, (float x)) { return __ocml_logb_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/logf.cpp b/libc/src/math/amdgpu/logf.cpp
deleted file mode 100644
index 17925672ef32..000000000000
--- a/libc/src/math/amdgpu/logf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logf function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logf, (float x)) { return __ocml_log_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/lrint.cpp b/libc/src/math/amdgpu/lrint.cpp
index 715b55257578..5ba70ec890b2 100644
--- a/libc/src/math/amdgpu/lrint.cpp
+++ b/libc/src/math/amdgpu/lrint.cpp
@@ -9,7 +9,6 @@
#include "src/math/lrint.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/lrintf.cpp b/libc/src/math/amdgpu/lrintf.cpp
index 387063803f27..1c985b01c2dc 100644
--- a/libc/src/math/amdgpu/lrintf.cpp
+++ b/libc/src/math/amdgpu/lrintf.cpp
@@ -9,7 +9,6 @@
#include "src/math/lrintf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/nextafter.cpp b/libc/src/math/amdgpu/nextafter.cpp
deleted file mode 100644
index 226b8a5a1254..000000000000
--- a/libc/src/math/amdgpu/nextafter.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafter function for GPU ------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafter.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, nextafter, (double x, double y)) {
- return __ocml_nextafter_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/nextafterf.cpp b/libc/src/math/amdgpu/nextafterf.cpp
deleted file mode 100644
index 7bed2c17b6e1..000000000000
--- a/libc/src/math/amdgpu/nextafterf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafterf function for GPU -----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafterf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, nextafterf, (float x, float y)) {
- return __ocml_nextafter_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/platform.h b/libc/src/math/amdgpu/platform.h
deleted file mode 100644
index 472a9830e8bb..000000000000
--- a/libc/src/math/amdgpu/platform.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- AMDGPU specific platform definitions for math support -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H
-#define LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H
-
-#include "src/__support/macros/attributes.h"
-#include "src/__support/macros/config.h"
-
-#include <stdint.h>
-
-namespace LIBC_NAMESPACE_DECL {
-
-// The ROCm device library uses control globals to alter codegen for the
-// different targets. To avoid needing to link them in manually we simply
-// define them here.
-extern "C" {
-
-// Disable unsafe math optimizations in the implementation.
-extern const LIBC_INLINE_VAR uint8_t __oclc_unsafe_math_opt = 0;
-
-// Disable denormalization at zero optimizations in the implementation.
-extern const LIBC_INLINE_VAR uint8_t __oclc_daz_opt = 0;
-
-// Disable rounding optimizations for 32-bit square roots.
-extern const LIBC_INLINE_VAR uint8_t __oclc_correctly_rounded_sqrt32 = 1;
-
-// Disable finite math optimizations.
-extern const LIBC_INLINE_VAR uint8_t __oclc_finite_only_opt = 0;
-
-// Set the ISA value to a high enough value that the ROCm device library math
-// functions will assume we have fast FMA operations among other features. This
-// is determined to be safe on all targets by looking at the source code.
-// https://github.com/ROCm/ROCm-Device-Libs/blob/amd-stg-open/ocml/src/opts.h
-extern const LIBC_INLINE_VAR uint32_t __oclc_ISA_version = 9000;
-}
-
-// These aliases cause clang to emit the control constants with ODR linkage.
-// This allows us to link against the symbols without preventing them from being
-// optimized out or causing symbol collisions.
-[[gnu::alias("__oclc_unsafe_math_opt")]] const uint8_t __oclc_unsafe_math_opt__;
-[[gnu::alias("__oclc_daz_opt")]] const uint8_t __oclc_daz_opt__;
-[[gnu::alias("__oclc_correctly_rounded_sqrt32")]] const uint8_t
- __oclc_correctly_rounded_sqrt32__;
-[[gnu::alias("__oclc_finite_only_opt")]] const uint8_t __oclc_finite_only_opt__;
-[[gnu::alias("__oclc_ISA_version")]] const uint32_t __oclc_ISA_version__;
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H
diff --git a/libc/src/math/amdgpu/powf.cpp b/libc/src/math/amdgpu/powf.cpp
deleted file mode 100644
index 6931934d4c11..000000000000
--- a/libc/src/math/amdgpu/powf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powf, (float x, float y)) {
- return __ocml_pow_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/powi.cpp b/libc/src/math/amdgpu/powi.cpp
deleted file mode 100644
index 6b31b471e4b2..000000000000
--- a/libc/src/math/amdgpu/powi.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powi function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powi.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, powi, (double x, int y)) {
- return __ocml_pown_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/powif.cpp b/libc/src/math/amdgpu/powif.cpp
deleted file mode 100644
index 94f8a91d9c03..000000000000
--- a/libc/src/math/amdgpu/powif.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powi function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powif.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powif, (float x, int y)) {
- return __ocml_pown_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/remquo.cpp b/libc/src/math/amdgpu/remquo.cpp
deleted file mode 100644
index 42c908e91c6c..000000000000
--- a/libc/src/math/amdgpu/remquo.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- Implementation of the GPU remquo function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquo.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, remquo, (double x, double y, int *quo)) {
- int tmp;
- double r = __ocml_remquo_f64(x, y, (gpu::Private<int> *)&tmp);
- *quo = tmp;
- return r;
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/remquof.cpp b/libc/src/math/amdgpu/remquof.cpp
deleted file mode 100644
index 854d3bfe842f..000000000000
--- a/libc/src/math/amdgpu/remquof.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- Implementation of the GPU remquof function ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquof.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, remquof, (float x, float y, int *quo)) {
- int tmp;
- float r = __ocml_remquo_f32(x, y, (gpu::Private<int> *)&tmp);
- *quo = tmp;
- return r;
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/scalbn.cpp b/libc/src/math/amdgpu/scalbn.cpp
index 05bbbc69b47a..3c3c19ea0d9d 100644
--- a/libc/src/math/amdgpu/scalbn.cpp
+++ b/libc/src/math/amdgpu/scalbn.cpp
@@ -9,7 +9,6 @@
#include "src/math/scalbn.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/scalbnf.cpp b/libc/src/math/amdgpu/scalbnf.cpp
index f0e9e475674c..c348aa7c3be2 100644
--- a/libc/src/math/amdgpu/scalbnf.cpp
+++ b/libc/src/math/amdgpu/scalbnf.cpp
@@ -9,7 +9,6 @@
#include "src/math/scalbnf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/amdgpu/sin.cpp b/libc/src/math/amdgpu/sin.cpp
deleted file mode 100644
index f3d88af009ce..000000000000
--- a/libc/src/math/amdgpu/sin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sin function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sin, (double x)) { return __ocml_sin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/sincos.cpp b/libc/src/math/amdgpu/sincos.cpp
deleted file mode 100644
index 304ac0c7c633..000000000000
--- a/libc/src/math/amdgpu/sincos.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincos function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincos, (double x, double *sinptr, double *cosptr)) {
- *sinptr = __ocml_sincos_f64(x, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/sincosf.cpp b/libc/src/math/amdgpu/sincosf.cpp
deleted file mode 100644
index 1c4e9c6a2463..000000000000
--- a/libc/src/math/amdgpu/sincosf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincosf function for GPU --------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincosf, (float x, float *sinptr, float *cosptr)) {
- *sinptr = __ocml_sincos_f32(x, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/sinf.cpp b/libc/src/math/amdgpu/sinf.cpp
deleted file mode 100644
index c6d64a63c755..000000000000
--- a/libc/src/math/amdgpu/sinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinf, (float x)) { return __ocml_sin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/sinh.cpp b/libc/src/math/amdgpu/sinh.cpp
deleted file mode 100644
index 26314f46d0e9..000000000000
--- a/libc/src/math/amdgpu/sinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sinh, (double x)) { return __ocml_sinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/sinhf.cpp b/libc/src/math/amdgpu/sinhf.cpp
deleted file mode 100644
index a4eb8e1a6528..000000000000
--- a/libc/src/math/amdgpu/sinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinhf, (float x)) { return __ocml_sinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tan.cpp b/libc/src/math/amdgpu/tan.cpp
deleted file mode 100644
index c946dc2a3db6..000000000000
--- a/libc/src/math/amdgpu/tan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tan function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tan, (double x)) { return __ocml_tan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tanf.cpp b/libc/src/math/amdgpu/tanf.cpp
deleted file mode 100644
index 8c93fc4f6236..000000000000
--- a/libc/src/math/amdgpu/tanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanf, (float x)) { return __ocml_tan_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tanh.cpp b/libc/src/math/amdgpu/tanh.cpp
deleted file mode 100644
index 834353e122ab..000000000000
--- a/libc/src/math/amdgpu/tanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tanh, (double x)) { return __ocml_tanh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tanhf.cpp b/libc/src/math/amdgpu/tanhf.cpp
deleted file mode 100644
index 5029596a8e6f..000000000000
--- a/libc/src/math/amdgpu/tanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanhf, (float x)) { return __ocml_tanh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tgamma.cpp b/libc/src/math/amdgpu/tgamma.cpp
index 485a6a3def43..0dfb0fd9ee13 100644
--- a/libc/src/math/amdgpu/tgamma.cpp
+++ b/libc/src/math/amdgpu/tgamma.cpp
@@ -9,11 +9,10 @@
#include "src/math/tgamma.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(double, tgamma, (double x)) { return __ocml_tgamma_f64(x); }
+LLVM_LIBC_FUNCTION(double, tgamma, (double)) { return 0.0; }
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/amdgpu/tgammaf.cpp b/libc/src/math/amdgpu/tgammaf.cpp
index e48a486c9c5e..9dd17ab8de91 100644
--- a/libc/src/math/amdgpu/tgammaf.cpp
+++ b/libc/src/math/amdgpu/tgammaf.cpp
@@ -9,11 +9,10 @@
#include "src/math/tgammaf.h"
#include "src/__support/common.h"
-#include "declarations.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(float, tgammaf, (float x)) { return __ocml_tgamma_f32(x); }
+LLVM_LIBC_FUNCTION(float, tgammaf, (float)) { return 0.0f; }
} // namespace LIBC_NAMESPACE_DECL