Skip to content

[libc] Add support for powi as an LLVM libc extension on the GPU #98236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jul 9, 2024

Summary:
This function is used by the CUDA / HIP / OpenMP headers and exists as
an NVIDIA extension basically. This function is implemented in the C23
standard as pown, but for now we need to provide powi for backwards
compatibility. In the future this entrypoint will just be a redirect to
pown once that is implemented.

@llvmbot
Copy link
Member

llvmbot commented Jul 9, 2024

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
This function is used by the CUDA / HIP / OpenMP headers and exists as
an NVIDIA extension basically. This function is implemented in the C23
standard as pown, but for now we need to provide powi for backwards
compatibility. In the future this entrypoint will just be a redirect to
pown once that is implemented.


Full diff: https://github.com/llvm/llvm-project/pull/98236.diff

14 Files Affected:

  • (modified) libc/config/gpu/entrypoints.txt (+2)
  • (modified) libc/docs/math/index.rst (+2)
  • (modified) libc/spec/llvm_libc_ext.td (+3)
  • (modified) libc/src/math/CMakeLists.txt (+2)
  • (modified) libc/src/math/amdgpu/CMakeLists.txt (+24)
  • (modified) libc/src/math/amdgpu/declarations.h (+2)
  • (added) libc/src/math/amdgpu/powi.cpp (+20)
  • (added) libc/src/math/amdgpu/powif.cpp (+20)
  • (modified) libc/src/math/nvptx/CMakeLists.txt (+24)
  • (modified) libc/src/math/nvptx/declarations.h (+2)
  • (added) libc/src/math/nvptx/powi.cpp (+18)
  • (added) libc/src/math/nvptx/powif.cpp (+18)
  • (added) libc/src/math/powi.h (+18)
  • (added) libc/src/math/powif.h (+18)
diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt
index 62f3f0df247cc..166144d634344 100644
--- a/libc/config/gpu/entrypoints.txt
+++ b/libc/config/gpu/entrypoints.txt
@@ -313,6 +313,8 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nexttowardf
     libc.src.math.pow
     libc.src.math.powf
+    libc.src.math.powi
+    libc.src.math.powif
     libc.src.math.remainder
     libc.src.math.remainderf
     libc.src.math.remquo
diff --git a/libc/docs/math/index.rst b/libc/docs/math/index.rst
index 7914a3d7e6d1a..83daefe785380 100644
--- a/libc/docs/math/index.rst
+++ b/libc/docs/math/index.rst
@@ -320,6 +320,8 @@ Higher Math Functions
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
 | pow       | |check|          |                 |                        |                      |                        | 7.12.7.5               | F.10.4.5                   |
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
+| powi      | |check|\*        | |check|\*       |                        |                      |                        |                        |                            |
++-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
 | pown      |                  |                 |                        |                      |                        | 7.12.7.6               | F.10.4.6                   |
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
 | powr      |                  |                 |                        |                      |                        | 7.12.7.7               | F.10.4.7                   |
diff --git a/libc/spec/llvm_libc_ext.td b/libc/spec/llvm_libc_ext.td
index c0374cb631191..86215029831ca 100644
--- a/libc/spec/llvm_libc_ext.td
+++ b/libc/spec/llvm_libc_ext.td
@@ -76,6 +76,9 @@ def LLVMLibcExt : StandardSpec<"llvm_libc_ext"> {
           GuardedFunctionSpec<"f16sqrt", RetValSpec<Float16Type>, [ArgSpec<DoubleType>], "LIBC_TYPES_HAS_FLOAT16">,
           GuardedFunctionSpec<"f16sqrtf", RetValSpec<Float16Type>, [ArgSpec<FloatType>], "LIBC_TYPES_HAS_FLOAT16">,
           GuardedFunctionSpec<"f16sqrtl", RetValSpec<Float16Type>, [ArgSpec<LongDoubleType>], "LIBC_TYPES_HAS_FLOAT16">,
+
+          FunctionSpec<"powi", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<IntType>]>,
+          FunctionSpec<"powif", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<IntType>]>,
       ]
   >;
 
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 74c2e4efda617..3a13ccbedec5a 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -342,6 +342,8 @@ add_math_entrypoint_object(nextupf128)
 
 add_math_entrypoint_object(pow)
 add_math_entrypoint_object(powf)
+add_math_entrypoint_object(powi)
+add_math_entrypoint_object(powif)
 
 add_math_entrypoint_object(remainder)
 add_math_entrypoint_object(remainderf)
diff --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 202177f54b11a..2ceb12785c607 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -468,6 +468,30 @@ add_entrypoint_object(
   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
diff --git a/libc/src/math/amdgpu/declarations.h b/libc/src/math/amdgpu/declarations.h
index 5d7f3c9609d23..81d788d943f22 100644
--- a/libc/src/math/amdgpu/declarations.h
+++ b/libc/src/math/amdgpu/declarations.h
@@ -65,6 +65,8 @@ 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 *);
diff --git a/libc/src/math/amdgpu/powi.cpp b/libc/src/math/amdgpu/powi.cpp
new file mode 100644
index 0000000000000..b13cb52aaaf6a
--- /dev/null
+++ b/libc/src/math/amdgpu/powi.cpp
@@ -0,0 +1,20 @@
+//===-- 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 "declarations.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(double, powi, (double x, int y)) {
+  return __ocml_pown_f64(x, y);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/amdgpu/powif.cpp b/libc/src/math/amdgpu/powif.cpp
new file mode 100644
index 0000000000000..7682f0e1a27a6
--- /dev/null
+++ b/libc/src/math/amdgpu/powif.cpp
@@ -0,0 +1,20 @@
+//===-- 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 "declarations.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float, powif, (float x, int y)) {
+  return __ocml_pown_f32(x, y);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/nvptx/CMakeLists.txt b/libc/src/math/nvptx/CMakeLists.txt
index bf37c52f09e44..4295ebf9ff630 100644
--- a/libc/src/math/nvptx/CMakeLists.txt
+++ b/libc/src/math/nvptx/CMakeLists.txt
@@ -421,6 +421,30 @@ add_entrypoint_object(
   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
diff --git a/libc/src/math/nvptx/declarations.h b/libc/src/math/nvptx/declarations.h
index d41b16c8eec9f..cf8f6e09e492a 100644
--- a/libc/src/math/nvptx/declarations.h
+++ b/libc/src/math/nvptx/declarations.h
@@ -64,6 +64,8 @@ double __nv_nextafter(double, double);
 float __nv_nextafterf(float, float);
 double __nv_pow(double, double);
 float __nv_powf(float, float);
+double __nv_powi(double, int);
+float __nv_powif(float, int);
 double __nv_sin(double);
 float __nv_sinf(float);
 void __nv_sincos(double, double *, double *);
diff --git a/libc/src/math/nvptx/powi.cpp b/libc/src/math/nvptx/powi.cpp
new file mode 100644
index 0000000000000..b7871ab9da92e
--- /dev/null
+++ b/libc/src/math/nvptx/powi.cpp
@@ -0,0 +1,18 @@
+//===-- 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 "declarations.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(double, powi, (double x, int y)) { return __nv_powi(x, y); }
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/nvptx/powif.cpp b/libc/src/math/nvptx/powif.cpp
new file mode 100644
index 0000000000000..0143745479cec
--- /dev/null
+++ b/libc/src/math/nvptx/powif.cpp
@@ -0,0 +1,18 @@
+//===-- Implementation of the powif 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 "declarations.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float, powif, (float x, int y)) { return __nv_powif(x, y); }
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/powi.h b/libc/src/math/powi.h
new file mode 100644
index 0000000000000..71f6562d59154
--- /dev/null
+++ b/libc/src/math/powi.h
@@ -0,0 +1,18 @@
+//===-- Implementation header for powi --------------------------*- C++ -*-===//
+//
+// 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_POW_H
+#define LLVM_LIBC_SRC_MATH_POW_H
+
+namespace LIBC_NAMESPACE {
+
+double powi(double x, int y);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_POW_H
diff --git a/libc/src/math/powif.h b/libc/src/math/powif.h
new file mode 100644
index 0000000000000..08833dec33ab3
--- /dev/null
+++ b/libc/src/math/powif.h
@@ -0,0 +1,18 @@
+//===-- Implementation header for powif -------------------------*- C++ -*-===//
+//
+// 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_POW_H
+#define LLVM_LIBC_SRC_MATH_POW_H
+
+namespace LIBC_NAMESPACE {
+
+float powif(float x, int y);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_POW_H

//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_POW_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

POWIF_H

//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_SRC_MATH_POW_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

POWI_H

Summary:
This function is used by the CUDA / HIP / OpenMP headers and exists as
an NVIDIA extension basically. This function is implemented in the C23
standard as `pown`, but for now we need to provide `powi` for backwards
compatibility. In the future this entrypoint will just be a redirect to
`pown` once that is implemented.
@jhuber6 jhuber6 merged commit 60ff9c2 into llvm:main Jul 10, 2024
5 of 6 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder libc-riscv64-debian-fullbuild-dbg running on libc-riscv64-debian while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/183/builds/1137

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcCbrtfTest.SpecialNumbers
[       OK ] LlvmLibcCbrtfTest.SpecialNumbers (61 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2246/3090] Running unit test libc.test.src.math.smoke.cbrtf_test.__unit__.__NO_FMA_OPT
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcCbrtfTest.SpecialNumbers
[       OK ] LlvmLibcCbrtfTest.SpecialNumbers (63 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2247/3090] Running unit test libc.test.src.math.smoke.nan_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ 
cd /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke && /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nan_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanTest.NCharSeq
[       OK ] LlvmLibcNanTest.NCharSeq (10 us)
[ RUN      ] LlvmLibcNanTest.RandomString
[       OK ] LlvmLibcNanTest.RandomString (4 us)
[ RUN      ] LlvmLibcNanTest.InvalidInput
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/smoke/nan_test.cpp:48: FAILURE
Process timed out after 1000 milliseconds.
[  FAILED  ] LlvmLibcNanTest.InvalidInput
Ran 3 tests.  PASS: 2  FAIL: 1
[2248/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__.dir/stdc_leading_zeros_ui_test.cpp.o
[2249/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_uc_test.__unit__.__build__.dir/stdc_leading_zeros_uc_test.cpp.o
[2250/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_us_test.__unit__.__build__.dir/stdc_leading_zeros_us_test.cpp.o
[2251/3090] Building CXX object projects/libc/test/src/search/CMakeFiles/libc.test.src.search.insque_test.__build__.dir/insque_test.cpp.o
[2252/3090] Building CXX object projects/libc/test/src/search/CMakeFiles/libc.test.src.search.hsearch_test.__build__.dir/hsearch_test.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', 'libc-unit-tests']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP libc-api-test@@@
Running: ninja libc-api-test
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcCbrtfTest.SpecialNumbers
[       OK ] LlvmLibcCbrtfTest.SpecialNumbers (61 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2246/3090] Running unit test libc.test.src.math.smoke.cbrtf_test.__unit__.__NO_FMA_OPT
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcCbrtfTest.SpecialNumbers
[       OK ] LlvmLibcCbrtfTest.SpecialNumbers (63 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[2247/3090] Running unit test libc.test.src.math.smoke.nan_test.__unit__
FAILED: projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.nan_test.__unit__ 
cd /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke && /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/test/src/math/smoke/libc.test.src.math.smoke.nan_test.__unit__.__build__
[==========] Running 3 tests from 1 test suite.
[ RUN      ] LlvmLibcNanTest.NCharSeq
[       OK ] LlvmLibcNanTest.NCharSeq (10 us)
[ RUN      ] LlvmLibcNanTest.RandomString
[       OK ] LlvmLibcNanTest.RandomString (4 us)
[ RUN      ] LlvmLibcNanTest.InvalidInput
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/smoke/nan_test.cpp:48: FAILURE
Process timed out after 1000 milliseconds.
[  FAILED  ] LlvmLibcNanTest.InvalidInput
Ran 3 tests.  PASS: 2  FAIL: 1
[2248/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_ui_test.__unit__.__build__.dir/stdc_leading_zeros_ui_test.cpp.o
[2249/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_uc_test.__unit__.__build__.dir/stdc_leading_zeros_uc_test.cpp.o
[2250/3090] Building CXX object projects/libc/test/src/stdbit/CMakeFiles/libc.test.src.stdbit.stdc_leading_zeros_us_test.__unit__.__build__.dir/stdc_leading_zeros_us_test.cpp.o
[2251/3090] Building CXX object projects/libc/test/src/search/CMakeFiles/libc.test.src.search.insque_test.__build__.dir/insque_test.cpp.o
[2252/3090] Building CXX object projects/libc/test/src/search/CMakeFiles/libc.test.src.search.hsearch_test.__build__.dir/hsearch_test.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', 'libc-unit-tests']' returned non-zero exit status 1.

aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
…lvm#98236)

Summary:
This function is used by the CUDA / HIP / OpenMP headers and exists as
an NVIDIA extension basically. This function is implemented in the C23
standard as `pown`, but for now we need to provide `powi` for backwards
compatibility. In the future this entrypoint will just be a redirect to
`pown` once that is implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants