[llvm] [llvm-calc-occupancy] Add an AMDGPU occupancy calculator tool (PR #208727)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 06:15:39 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `llvm` at step 4 "annotate".

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

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

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --cmake-file=AMDGPULibcBot.cmake' (failure)
...
[168/176] Building C object clang_rt.crtend.o
[169/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/truncdfbf2.c.o
[170/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundidf.S.o
[171/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundisf.S.o
[172/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/trunctfbf2.c.o
[173/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/truncsfbf2.c.o
[174/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/cpu_model/x86.c.o
[175/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundixf.S.o
[176/176] Linking C static library /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib/clang/24/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
[5071/5096] Building CXX object tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o
FAILED: tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o 
ccache /usr/bin/c++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/llvm-calc-occupancy -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/lib/Target/AMDGPU -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib/Target/AMDGPU -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -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-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -MF tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o.d -o tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -c /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp: In function ‘int main(int, char**)’:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229: error: ‘getAddressableNumSGPRs’ is not a member of ‘llvm::AMDGPU::IsaInfo’; did you mean ‘getAddressableNumVGPRs’?
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      | 
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
[168/176] Building C object clang_rt.crtend.o
[169/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/truncdfbf2.c.o
[170/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundidf.S.o
[171/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundisf.S.o
[172/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/trunctfbf2.c.o
[173/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/truncsfbf2.c.o
[174/176] Building C object CMakeFiles/clang_rt.builtins-x86_64.dir/cpu_model/x86.c.o
[175/176] Building ASM object CMakeFiles/clang_rt.builtins-x86_64.dir/x86_64/floatundixf.S.o
[176/176] Linking C static library /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib/clang/24/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
[5071/5096] Building CXX object tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o
FAILED: tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o 
ccache /usr/bin/c++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/llvm-calc-occupancy -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/lib/Target/AMDGPU -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib/Target/AMDGPU -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -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-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -MF tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o.d -o tools/llvm-calc-occupancy/CMakeFiles/llvm-calc-occupancy.dir/llvm-calc-occupancy.cpp.o -c /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp: In function ‘int main(int, char**)’:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp:229: error: ‘getAddressableNumSGPRs’ is not a member of ‘llvm::AMDGPU::IsaInfo’; did you mean ‘getAddressableNumVGPRs’?
  229 |   unsigned AddrSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(STI);
      | 
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=55.979380

```

</details>

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


More information about the llvm-commits mailing list