Skip to content
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

Test test_bfloat16_plus_float fails on s390x #2228

Open
skriesch opened this issue Nov 26, 2024 · 1 comment
Open

Test test_bfloat16_plus_float fails on s390x #2228

skriesch opened this issue Nov 26, 2024 · 1 comment
Labels
help wanted platform:cpu-s390x IBM Z systems based on s390x architecture sighting Suspicious library behavior. Should be promoted to a bug when confirmed

Comments

@skriesch
Copy link

Summary

Our build fails for s390x because the numbers are not rounded enough:
tests/gtests/internals/test_bfloat16.cpp:79: Failure
[18667s] Expected: (float {expect_bf16}) > (float {initial_value_bf16}), actual: 0 vs 4.59163e-41

Version

3.6

Environment

oneDNN includes hardware-specific optimizations and may behave
differently on depending on the compiler and build environment. Include
the following information to help reproduce the issue:

  • CPU make and model (try lscpu; if your lscpu does not list CPU flags,
    try running cat /proc/cpuinfo | grep flags | sort -u): s390x
  • OS version (uname -a): openSUSE Tumbleweed
  • Compiler version (gcc --version): gcc-14-2.1
  • CMake version (cmake --version): cmake-3.31.0-1.1
  • CMake output log:
/usr/bin/cmake /home/abuild/rpmbuild/BUILD/oneDNN-3.6/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/var/lib -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=var -DCMAKE_INSTALL_RUNSTATEDIR:PATH=run -DCMAKE_INSTALL_LIBDIR:PATH=lib64 -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_DOCDIR:PATH=share/doc/packages/onednn -DCMAKE_INSTALL_MANDIR:PATH=share/man -DCMAKE_INSTALL_INFODIR:PATH=share/info -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_CXX_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_Fortran_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' '-DCMAKE_EXE_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-flto=auto -Wl,--as-needed' '-DCMAKE_SHARED_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/lib64/cmake/onednn -DCMAKE_INSTALL_LIBDIR=lib64 -DMKLDNN_ARCH_OPT_FLAGS= -DDNNL_CPU_RUNTIME=OMP -DDNNL_INSTALL_MODE=DEFAULT -DDNNL_BUILD_TESTS=ON -DONEDNN_BUILD_GRAPH=ON -DDNNL_WERROR=OFF
[ 2068s] CMake Deprecation Warning at CMakeLists.txt:17 (cmake_minimum_required):
[ 2068s]   Compatibility with CMake < 3.10 will be removed from a future version of
[ 2068s]   CMake.
[ 2068s] 
[ 2068s]   Update the VERSION argument <min> value or use a ...<max> suffix to tell
[ 2068s]   CMake that the project does not need compatibility with older versions.
[ 2068s] 
[ 2068s] 
[ 2070s] -- The C compiler identification is GNU 14.2.1
[ 2071s] -- The CXX compiler identification is GNU 14.2.1
[ 2071s] -- Detecting C compiler ABI info
[ 2074s] -- Detecting C compiler ABI info - done
[ 2074s] -- Check for working C compiler: /usr/bin/cc - skipped
[ 2075s] -- Detecting C compile features
[ 2075s] -- Detecting C compile features - done
[ 2075s] -- Detecting CXX compiler ABI info
[ 2077s] -- Detecting CXX compiler ABI info - done
[ 2078s] -- Check for working CXX compiler: /usr/bin/c++ - skipped
[ 2078s] -- Detecting CXX compile features
[ 2078s] -- Detecting CXX compile features - done
[ 2078s] -- DNNL_TARGET_ARCH: S390X
[ 2078s] -- DNNL_LIBRARY_NAME: dnnl
[ 2078s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
[ 2082s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
[ 2082s] -- Found Threads: TRUE
[ 2089s] -- Found OpenMP_C: -fopenmp (found version "4.5")
[ 2092s] -- Found OpenMP_CXX: -fopenmp (found version "4.5")
[ 2092s] -- Found OpenMP: TRUE (found version "4.5")
[ 2092s] -- Found Doxygen: /usr/bin/doxygen (found version "1.12.0") found components: doxygen dot
[ 2093s] -- Could NOT find Doxyrest (missing: DOXYREST_EXECUTABLE) 
[ 2093s] CMake Warning (dev) at cmake/Sphinx.cmake:25 (find_package):
[ 2093s]   Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
[ 2093s]   are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
[ 2093s]   the cmake_policy command to set the policy and suppress this warning.
[ 2093s] 
[ 2093s] Call Stack (most recent call first):
[ 2093s]   cmake/doc.cmake:28 (include)
[ 2093s]   CMakeLists.txt:127 (include)
[ 2093s] This warning is for project developers.  Use -Wno-dev to suppress it.
[ 2093s] 
[ 2093s] -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
[ 2093s] -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) 
[ 2093s] -- Could NOT find Git (missing: GIT_EXECUTABLE) 
[ 2093s] -- Enabled testing coverage: CI
[ 2093s] -- Enabled workload: TRAINING
[ 2093s] -- Enabled primitives: ALL
[ 2093s] -- Enabled primitive CPU ISA: ALL
[ 2093s] -- Enabled primitive GPU ISA: ALL
[ 2093s] -- Enabled GeMM kernels ISA: ALL
[ 2093s] -- Primitive cache is enabled
[ 2093s] -- Graph component is enabled
[ 2093s] -- Graph compiler backend is disabled.
[ 2097s] -- Configuring done (29.2s)
[ 2101s] -- Generating done (4.5s)
[ 2101s] CMake Warning:
[ 2101s]   Manually-specified variables were not used by the project:
[ 2101s] 
[ 2101s]     BUILD_STATIC_LIBS
[ 2101s]     CMAKE_Fortran_FLAGS
[ 2101s]     CMAKE_INSTALL_DO_STRIP
[ 2101s]     CMAKE_MODULES_INSTALL_DIR
[ 2101s]     INCLUDE_INSTALL_DIR
[ 2101s]     LIB_INSTALL_DIR
[ 2101s]     LIB_SUFFIX
[ 2101s]     MKLDNN_ARCH_OPT_FLAGS
[ 2101s]     SHARE_INSTALL_PREFIX
[ 2101s]     SYSCONF_INSTALL_DIR
[ 2101s] 
  • git hash (git log -1 --format=%H)

Steps to reproduce

Build with openSUSE via OBS with tar archive.
-> build error with:

----------] 1 test from test_bfloat16_plus_float
[18667s] [ RUN      ] test_bfloat16_plus_float.TestDenormF32
[18667s] /home/abuild/rpmbuild/BUILD/oneDNN-3.6/tests/gtests/internals/test_bfloat16.cpp:79: Failure
[18667s] Expected: (float {expect_bf16}) > (float {initial_value_bf16}), actual: 0 vs 4.59163e-41
[18667s] [  FAILED  ] test_bfloat16_plus_float.TestDenormF32 (0 ms)
[18667s] [----------] 1 test from test_bfloat16_plus_float (0 ms total)

Observed behavior

Failed build on openSUSE for s390x because of missing rounding.

Expected behavior

Successful build on s390x without test failures.

@skriesch skriesch added the sighting Suspicious library behavior. Should be promoted to a bug when confirmed label Nov 26, 2024
@shu1chen shu1chen added the platform:cpu-s390x IBM Z systems based on s390x architecture label Nov 27, 2024
@uweigand
Copy link

@Andreas-Krebbel is this something we've already seen or where we could help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted platform:cpu-s390x IBM Z systems based on s390x architecture sighting Suspicious library behavior. Should be promoted to a bug when confirmed
Projects
None yet
Development

No branches or pull requests

4 participants