[PATCH] D118979: [AArch64] Set maximum VF with shouldMaximizeVectorBandwidth
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 18:02:37 PDT 2022
jaykang10 added a comment.
In D118979#3450111 <https://reviews.llvm.org/D118979#3450111>, @omjavaid wrote:
> In D118979#3448556 <https://reviews.llvm.org/D118979#3448556>, @jaykang10 wrote:
>
>> um... I have tried to reproduce it on a64fx machine. It looks it is failed with the big number of parallel tasks of ninja build. When I run the failed command manually, it is passed... If I reduce the number of the parallel tasks with ninja build like `ninja -j16`, the build is also passed... it could be memory allocation error from the bigger memory allocation than before...
>> The stage2 build and check-all are passed on Cortex-A72 machine...
>> To be safe, for now, I would like to disable `shouldMaximizeVectorBandwidth` for SVE...
>> Let me update this patch with it.
>
> I did have a completely difference experience, here are steps to reproduce:
>
> Stage 1:
>
> CC=$(pwd)/clang+llvm-13.0.1-aarch64-linux-gnu/bin/clang CXX=$(pwd)/clang+llvm-13.0.1-aarch64-linux-gnu/bin/clang++
> cmake -G Ninja ../llvm/llvm \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_ASSERTIONS=True \
> '-DLLVM_LIT_ARGS='"'"'-v'"'"'' \
> -DCMAKE_INSTALL_PREFIX=../stage$1.install \
> -DCMAKE_C_COMPILER=$CC \
> -DCMAKE_CXX_COMPILER=$CXX \
> '-DCMAKE_C_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> '-DCMAKE_CXX_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> -DLLVM_ENABLE_LLD=True \
> '-DLLVM_LIT_ARGS='"'"'-v -j12'"'"'' \
> '-DLLVM_ENABLE_PROJECTS=llvm;mlir;clang-tools-extra;compiler-rt;clang;lld;flang'
> ninja
>
> Stage 2:
>
> CC=$(pwd)/stage1/bin/clang CXX=$(pwd)/stage1/bin/clang++
> cmake -G Ninja ../llvm/llvm \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_ASSERTIONS=True \
> '-DLLVM_LIT_ARGS='"'"'-v'"'"'' \
> -DCMAKE_INSTALL_PREFIX=../stage$1.install \
> -DCMAKE_C_COMPILER=$CC \
> -DCMAKE_CXX_COMPILER=$CXX \
> '-DCMAKE_C_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> '-DCMAKE_CXX_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> -DLLVM_ENABLE_LLD=True \
> '-DLLVM_LIT_ARGS='"'"'-v -j12'"'"'' \
> '-DLLVM_ENABLE_PROJECTS=llvm;mlir;clang-tools-extra;compiler-rt;clang;lld;flang'
>
> ninja llvm-tblgen
>
> /home/omair.javaid/work/llvm-test/stage2/bin/llvm-tblgen -gen-dag-isel -I /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target/PowerPC -I/home/omair.javaid/work/llvm-test/stage2/include -I/home/omair.javaid/work/llvm-test/llvm/llvm/include -I /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target -omit-comments /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target/PowerPC/PPC.td --write-if-changed -o lib/Target/PowerP
In D118979#3450111 <https://reviews.llvm.org/D118979#3450111>, @omjavaid wrote:
> In D118979#3448556 <https://reviews.llvm.org/D118979#3448556>, @jaykang10 wrote:
>
>> um... I have tried to reproduce it on a64fx machine. It looks it is failed with the big number of parallel tasks of ninja build. When I run the failed command manually, it is passed... If I reduce the number of the parallel tasks with ninja build like `ninja -j16`, the build is also passed... it could be memory allocation error from the bigger memory allocation than before...
>> The stage2 build and check-all are passed on Cortex-A72 machine...
>> To be safe, for now, I would like to disable `shouldMaximizeVectorBandwidth` for SVE...
>> Let me update this patch with it.
>
> I did have a completely difference experience, here are steps to reproduce:
>
> Stage 1:
>
> CC=$(pwd)/clang+llvm-13.0.1-aarch64-linux-gnu/bin/clang CXX=$(pwd)/clang+llvm-13.0.1-aarch64-linux-gnu/bin/clang++
> cmake -G Ninja ../llvm/llvm \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_ASSERTIONS=True \
> '-DLLVM_LIT_ARGS='"'"'-v'"'"'' \
> -DCMAKE_INSTALL_PREFIX=../stage$1.install \
> -DCMAKE_C_COMPILER=$CC \
> -DCMAKE_CXX_COMPILER=$CXX \
> '-DCMAKE_C_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> '-DCMAKE_CXX_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> -DLLVM_ENABLE_LLD=True \
> '-DLLVM_LIT_ARGS='"'"'-v -j12'"'"'' \
> '-DLLVM_ENABLE_PROJECTS=llvm;mlir;clang-tools-extra;compiler-rt;clang;lld;flang'
> ninja
>
> Stage 2:
>
> CC=$(pwd)/stage1/bin/clang CXX=$(pwd)/stage1/bin/clang++
> cmake -G Ninja ../llvm/llvm \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_ASSERTIONS=True \
> '-DLLVM_LIT_ARGS='"'"'-v'"'"'' \
> -DCMAKE_INSTALL_PREFIX=../stage$1.install \
> -DCMAKE_C_COMPILER=$CC \
> -DCMAKE_CXX_COMPILER=$CXX \
> '-DCMAKE_C_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> '-DCMAKE_CXX_FLAGS='"'"'-mcpu=a64fx -msve-vector-bits=512 -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' \
> -DLLVM_ENABLE_LLD=True \
> '-DLLVM_LIT_ARGS='"'"'-v -j12'"'"'' \
> '-DLLVM_ENABLE_PROJECTS=llvm;mlir;clang-tools-extra;compiler-rt;clang;lld;flang'
>
> ninja llvm-tblgen
>
> /home/omair.javaid/work/llvm-test/stage2/bin/llvm-tblgen -gen-dag-isel -I /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target/PowerPC -I/home/omair.javaid/work/llvm-test/stage2/include -I/home/omair.javaid/work/llvm-test/llvm/llvm/include -I /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target -omit-comments /home/omair.javaid/work/llvm-test/llvm/llvm/lib/Target/PowerPC/PPC.td --write-if-changed -o lib/Target/PowerPC/PPCGenDAGISel.inc -d lib/Target/PowerPC/PPCGenDAGISel.inc.d
um... I also followed same thing from build bot's 1,2 stage cmake options on a64fx machine.
Let me check it again.
Can you let me know which core your testing machine please? I guessed you are using a64fx machine from the `-mcpu=a64fx` option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118979/new/
https://reviews.llvm.org/D118979
More information about the llvm-commits
mailing list