llvm-project trunk build fails on PowerPC

Hi,

$ ninja
[150/2173] Generating VCSRevision.h
– Found Git: /usr/bin/git (found version “1.8.3.1”)
[166/2173] Building LLVM bitcode data_sharing.cu-sm_60.bc
FAILED: projects/openmp/libomptarget/deviceRTLs/nvptx/data_sharing.cu-sm_60.bc
cd /tmp/projects/llvm-project/build/projects/openmp/libomptarget/deviceRTLs/nvptx && /p/project/cpcp0/pcp0151/opt/clang-ykt/bin/clang -emit-llvm -O1 --cuda-device-only --cuda-path=/gpfs/software/opt/cuda/9.2.148 -fcuda-rdc -DOMPTARGET_NVPTX_DEBUG=0 -Dnv_weak=weak --cuda-gpu-arch=sm_60 -c /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu -o data_sharing.cu-sm_60.bc
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:12:
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:28:
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:131:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:141:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
In file included from :1:
In file included from /p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:396:
/p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_intrinsics.h:173:35: error: ‘__nvvm_shfl_sync_idx_i32’ needs target feature ptx60|ptx61|ptx63|ptx64
__MAKE_SYNC_SHUFFLES(__shfl_sync, __nvvm_shfl_sync_idx_i32,
^
2 warnings and 1 error generated when compiling for sm_60.
[175/2173] Building LLVM bitcode reduction.cu-sm_60.bc
FAILED: projects/openmp/libomptarget/deviceRTLs/nvptx/reduction.cu-sm_60.bc
cd /tmp/projects/llvm-project/build/projects/openmp/libomptarget/deviceRTLs/nvptx && /p/project/cpcp0/pcp0151/opt/clang-ykt/bin/clang -emit-llvm -O1 --cuda-device-only --cuda-path=/gpfs/software/opt/cuda/9.2.148 -fcuda-rdc -DOMPTARGET_NVPTX_DEBUG=0 -Dnv_weak=weak --cuda-gpu-arch=sm_60 -c /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu -o reduction.cu-sm_60.bc
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu:17:
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:28:
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:131:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:141:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
In file included from :1:
In file included from /p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:396:
/p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_intrinsics.h:179:40: error: ‘__nvvm_shfl_sync_down_i32’ needs target feature ptx60|ptx61|ptx63|ptx64
__MAKE_SYNC_SHUFFLES(__shfl_down_sync, __nvvm_shfl_sync_down_i32,
^
2 warnings and 1 error generated when compiling for sm_60.
[176/2173] Building LLVM bitcode parallel.cu-sm_60.bc
FAILED: projects/openmp/libomptarget/deviceRTLs/nvptx/parallel.cu-sm_60.bc
cd /tmp/projects/llvm-project/build/projects/openmp/libomptarget/deviceRTLs/nvptx && /p/project/cpcp0/pcp0151/opt/clang-ykt/bin/clang -emit-llvm -O1 --cuda-device-only --cuda-path=/gpfs/software/opt/cuda/9.2.148 -fcuda-rdc -DOMPTARGET_NVPTX_DEBUG=0 -Dnv_weak=weak --cuda-gpu-arch=sm_60 -c /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu -o parallel.cu-sm_60.bc
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu:35:
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:28:
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:131:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:141:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
In file included from :1:
In file included from /p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:396:
/p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_intrinsics.h:173:35: error: ‘__nvvm_shfl_sync_idx_i32’ needs target feature ptx60|ptx61|ptx63|ptx64
__MAKE_SYNC_SHUFFLES(__shfl_sync, __nvvm_shfl_sync_idx_i32,
^
2 warnings and 1 error generated when compiling for sm_60.
[178/2173] Building LLVM bitcode loop.cu-sm_60.bc
FAILED: projects/openmp/libomptarget/deviceRTLs/nvptx/loop.cu-sm_60.bc
cd /tmp/projects/llvm-project/build/projects/openmp/libomptarget/deviceRTLs/nvptx && /p/project/cpcp0/pcp0151/opt/clang-ykt/bin/clang -emit-llvm -O1 --cuda-device-only --cuda-path=/gpfs/software/opt/cuda/9.2.148 -fcuda-rdc -DOMPTARGET_NVPTX_DEBUG=0 -Dnv_weak=weak --cuda-gpu-arch=sm_60 -c /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/loop.cu -o loop.cu-sm_60.bc
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/loop.cu:15:
In file included from /tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:28:
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:131:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
/tmp/projects/llvm-project/openmp/libomptarget/deviceRTLs/nvptx/src/debug.h:141:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename… Arguments>
^
In file included from :1:
In file included from /p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_runtime_wrapper.h:396:
/p/project/cpcp0/pcp0151/opt/clang-ykt/lib/clang/9.0.0/include/__clang_cuda_intrinsics.h:173:35: error: ‘__nvvm_shfl_sync_idx_i32’ needs target feature ptx60|ptx61|ptx63|ptx64
__MAKE_SYNC_SHUFFLES(__shfl_sync, __nvvm_shfl_sync_idx_i32,
^
2 warnings and 1 error generated when compiling for sm_60.
[198/2173] Building CXX object tools/l…llvm-rc.dir/ResourceScriptParser.cpp.o
ninja: build stopped: subcommand failed.

CMake options I set:

$ cmake -G “Ninja” -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PROJECT/pcp0151/opt/clang-trunk -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=PowerPC -DLIBOMP_ENABLE_SHARED=FALSE -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_60 -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=TRUE -DLIBOMP_ENABLE_SHARED=FALSE /tmp/projects/llvm-project

Hi Itaru,

I suspect you need to update the compiler you’re using to compile the BCLIB. It looks like it may be out of date.

Thanks,

–Doru

I tried building the trunk again with the release Clang 8.0.0, but it fails still.

Is there a PowerPC build log we can look at somewhere else?

Hi Doru,
When I tried to build the clang-ykt patched-upstream (clang-ykt-patched-May) today, I hit the same error when using the recent clang you provided on Ascent (clang-ykt-patched-April).
Then I switched to the llvm module built from a Feb version of clang (clang-ykt-patched-Feb) . The compilation went through.
Today, I tried to build upstream branch under the clang-ykt repo using clang-ykt-patched-May. I hit the same error again. Then I switched to clang-ykt-patched-Feb and the compilation completed fine.
So I think there is some real issue.

Ye

Gheorghe-Teod Bercea via Openmp-dev <openmp-dev@lists.llvm.org> 于2019年5月1日周三 上午8:32写道:

Hi Ye, Itaru,

I will investigate. It looks like the PTX version wasn’t properly set for that case.

Thanks for testing this.

Thanks,

–Doru

Hi Ye, Itaru,

I submitted a bugfix for review: https://reviews.llvm.org/D61474

This error should go away once it gets approved.

Thanks,

–Doru

Thanks! I’ll start building the trunk again on JURON at JSC when it is landed.

noname.jpg