[libc] [llvm] [libc][math] Add floating-point cast independent of compiler runtime (PR #105152)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 10:52:28 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `libc,utils` at step 5 "compile-openmp".

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (compile-openmp) failure: build (failure)
...
1.149 [3562/28/709] Building arm_sve_builtin_cg.inc...
1.150 [3562/27/710] Building arm_sve_sema_rangechecks.inc...
1.150 [3562/26/711] Building arm_sve_builtins.inc...
1.161 [3562/25/712] Building IntrinsicsSPIRV.h...
1.189 [3562/24/713] Building riscv_vector_builtins.inc...
1.682 [3562/23/714] Building IntrinsicsAMDGPU.h...
1.682 [3562/22/715] Building riscv_vector_builtin_cg.inc...
1.683 [3562/21/716] Building CXX object lib/Frontend/OpenACC/CMakeFiles/LLVMFrontendOpenACC.dir/ACC.cpp.o
1.712 [3561/21/717] Linking CXX static library lib/libLLVMFrontendOpenACC.a
1.713 [3561/20/718] Building CXX object projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp.o
FAILED: projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp.o 
ccache /usr/bin/c++ -DLIBC_COPT_ARRAY_ARG_LIST -DLIBC_COPT_MEMCPY_USE_EMBEDDED_TINY -DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE -DLIBC_COPT_PRINTF_DISABLE_STRERROR -DLIBC_COPT_PRINTF_DISABLE_WRITE_INT -DLIBC_COPT_USE_C_ASSERT -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -DLIBC_TYPES_LONG_DOUBLE_IS_FLOAT64 -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/projects/libc/utils/gpu/server -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/utils/gpu/server -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -Wno-attributes -std=c++17 -MD -MT projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp.o -MF projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp.o.d -o projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp.o -c /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp
In file included from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/string/memory_utils/inline_memcpy.h:14,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/writer.h:16,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.h:14,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp:9:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/string/memory_utils/utils.h: In function ‘void __llvm_libc_20_0_0_git::memcpy_inline(void*, const void*)’:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/string/memory_utils/utils.h:95:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
   95 | #pragma GCC diagnostic ignored "-Wstringop-overread"
      |                                ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/float_to_string.h:17,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/float_dec_converter.h:16,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter_atlas.h:29,
                 from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/printf_core/converter.cpp:20:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h: In member function ‘constexpr __llvm_libc_20_0_0_git::cpp::enable_if_t<(is_floating_point_v<T> && (__llvm_libc_20_0_0_git::fputil::FPBits<T>::FRACTION_LEN < Bits)), T> __llvm_libc_20_0_0_git::fputil::DyadicFloat<Bits>::generic_as() const’:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:108:27: error: ‘float16’ was not declared in this scope; did you mean ‘float_t’?
  108 |     using FPBits = FPBits<float16>;
      |                           ^~~~~~~
      |                           float_t
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:108:34: error: template argument 1 is invalid
  108 |     using FPBits = FPBits<float16>;
      |                                  ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:109:34: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  109 |     using StorageType = typename FPBits::StorageType;
      |                                  ^~~~~~
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:111:51: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  111 |     constexpr int EXTRA_FRACTION_LEN = Bits - 1 - FPBits::FRACTION_LEN;
      |                                                   ^~~~~~
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:114:14: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  114 |       return FPBits::zero(sign).get_val();
      |              ^~~~~~
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:118:24: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  118 |     if (unbiased_exp + FPBits::EXP_BIAS >= FPBits::MAX_BIASED_EXPONENT) {
      |                        ^~~~~~
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:118:44: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  118 |     if (unbiased_exp + FPBits::EXP_BIAS >= FPBits::MAX_BIASED_EXPONENT) {
      |                                            ^~~~~~
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/__support/FPUtil/dyadic_float.h:126:16: error: ‘template<class T> struct __llvm_libc_20_0_0_git::fputil::FPBits’ used without template arguments
  126 |         return FPBits::inf(sign).get_val();

```

</details>

https://github.com/llvm/llvm-project/pull/105152


More information about the llvm-commits mailing list