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

Build failure on Power10 #2145

Open
varad-ahirwadkar opened this issue Oct 3, 2024 · 2 comments · May be fixed by #2153
Open

Build failure on Power10 #2145

varad-ahirwadkar opened this issue Oct 3, 2024 · 2 comments · May be fixed by #2153
Labels
bug A confirmed library bug platform:cpu-ppc64 PowerPC sighting Suspicious library behavior. Should be promoted to a bug when confirmed

Comments

@varad-ahirwadkar
Copy link

varad-ahirwadkar commented Oct 3, 2024

Summary

Hi team,
I have tried building oneDNN with following steps on Power 10, it fails due to errors like 'out_round' was not declared in this scope.

sh-5.1# cmake --build ./oneDNN/build --target install --config Release
[26/167] Building CXX object src/cpu/ppc64/CMakeFiles/dnnl_cpu_ppc64.dir/ppc64_gemm_s8x8s32.cpp.o
FAILED: src/cpu/ppc64/CMakeFiles/dnnl_cpu_ppc64.dir/ppc64_gemm_s8x8s32.cpp.o
/usr/bin/c++ -DDNNL_ENABLE_CPU_ISA_HINTS -DDNNL_ENABLE_MAX_CPU_ISA -DDNNL_PPC64=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/oneDNN/build/include -I/oneDNN/include -I/oneDNN/src -fopenmp -fvisibility-inlines-hidden  -Wall -Wno-unknown-pragmas -fvisibility=internal -O3 -mcpu=native  -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong  -Wmissing-field-initializers  -Wno-strict-overflow -Wno-maybe-uninitialized  -std=c++11 -O3 -funroll-loops -MD -MT src/cpu/ppc64/CMakeFiles/dnnl_cpu_ppc64.dir/ppc64_gemm_s8x8s32.cpp.o -MF src/cpu/ppc64/CMakeFiles/dnnl_cpu_ppc64.dir/ppc64_gemm_s8x8s32.cpp.o.d -o src/cpu/ppc64/CMakeFiles/dnnl_cpu_ppc64.dir/ppc64_gemm_s8x8s32.cpp.o -c /oneDNN/src/cpu/ppc64/ppc64_gemm_s8x8s32.cpp
/oneDNN/src/cpu/ppc64/ppc64_gemm_s8x8s32.cpp: In function ‘dnnl_status_t dnnl::impl::cpu::ppc64::cblas_gemm_s8x8s32_ppc64(int, int, const char*, dnnl::impl::dim_t, dnnl::impl::dim_t, dnnl::impl::dim_t, float, const int8_t*, dnnl::impl::dim_t, const int8_t*, const uint8_t*, dnnl::impl::dim_t, const uint8_t*, int*, float, dnnl::impl::dim_t, const int*, int)’:
/oneDNN/src/cpu/ppc64/ppc64_gemm_s8x8s32.cpp:153:32: error: ‘out_round’ was not declared in this scope; did you mean ‘dnnl::impl::cpu::q10n::out_round’?
  153 |                 comparray[i] = out_round<int32_t>(saturate<int32_t>(
      |                                ^~~~~~~~~
      |                                dnnl::impl::cpu::q10n::out_round

To fix this I have added using namespace cpu::q10n; in ppc64_gemm_s8x8s32.cpp and able to build.

Environment

  • OS version: UBI9 (Linux ocp4alll300.pok.stglabs.ibm.com 5.14.0-427.16.1.el9_4.ppc64le)
  • Compiler version: gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
  • CMake version: cmake version 3.30.4
  • CMake output log - 1. cmake_buildsystem.txt 2. cmake_build.txt
  • git hash- 8393e5c

Steps to reproduce

Clone the repository and run following commands:

sh-5.1# cmake -B ./oneDNN/build -S ./oneDNN -G Ninja -DONEDNN_LIBRARY_TYPE=STATIC   -DONEDNN_BUILD_DOC=OFF   -DONEDNN_BUILD_EXAMPLES=OFF    -DONEDNN_BUILD_TESTS=OFF    -DONEDNN_BUILD_GRAPH=OFF   -DONEDNN_ENABLE_WORKLOAD=INFERENCE   -DONEDNN_ENABLE_PRIMITIVE=MATMUL

sh-5.1# cmake --build ./oneDNN/build --target install --config Release

Observed behavior

Fails to build the oneDNN

Expected behavior

Should able to build oneDNN.

@varad-ahirwadkar varad-ahirwadkar added the sighting Suspicious library behavior. Should be promoted to a bug when confirmed label Oct 3, 2024
@mgouicem
Copy link
Contributor

mgouicem commented Oct 4, 2024

Thanks for the report @varad-ahirwadkar. We don't have POWER10 available to validate a fix on our side. Do you mind opening a PR with your fix?

@mgouicem mgouicem added platform:cpu-ppc64 PowerPC bug A confirmed library bug labels Oct 4, 2024
@varad-ahirwadkar
Copy link
Author

Hi @mgouicem, sure. I will open a PR.

@varad-ahirwadkar varad-ahirwadkar changed the title oneDNN build failure on Power10 Build failure on Power10 Oct 4, 2024
@varad-ahirwadkar varad-ahirwadkar linked a pull request Oct 7, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed library bug platform:cpu-ppc64 PowerPC sighting Suspicious library behavior. Should be promoted to a bug when confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants