[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:19:47 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `amdgpu-clang-flang` running on `AMD-bb-w-05` while building `llvm` at step 3 "annotate".

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

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

```
Step 3 (annotate) failure: 'python ../llvm.src/offload/ci/openmp-offload-amdgpu-clang-flang.py ...' (failure)
...
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
-- Configuring done (4.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-clang-flang/build/llvm.build/runtimes/builtins-bins
[ 99%/44.750s :: 38->4->8697 (of 8738)] 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 /opt/rh/gcc-toolset-13/root/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/amdgpu-clang-flang/build/llvm.build/tools/llvm-calc-occupancy -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy -I/home/botworker/bbot/amdgpu-clang-flang/build/llvm.build/include -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/include -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/lib/Target/AMDGPU -I/home/botworker/bbot/amdgpu-clang-flang/build/llvm.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-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -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 -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -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/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp: In function ‘int main(int, char**)’:
/home/botworker/bbot/amdgpu-clang-flang/llvm.src/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);
      | 
[ 99%/45.743s :: 38->2->8699 (of 8738)] Linking CXX shared library lib/libFortranLower.so.24.0git
ninja: build stopped: subcommand failed.
Running: ccache -sv
Cache directory:              /home/botworker/.cache/ccache
Config file:                  /home/botworker/.config/ccache/ccache.conf
System config file:           /usr/local/etc/ccache.conf
Stats updated:                Thu Jul 30 13:18:36 2026
Cacheable calls:               5618 / 5621 (99.95%)
  Hits:                        5611 / 5618 (99.88%)
    Direct:                    5068 / 5611 (90.32%)
    Preprocessed:               543 / 5611 ( 9.68%)
  Misses:                         7 / 5618 ( 0.12%)
Uncacheable calls:                3 / 5621 ( 0.05%)
  Compilation failed:             1 /    3 (33.33%)
  Unsupported code directive:     2 /    3 (66.67%)
Successful lookups:
  Direct:                      5068 / 5621 (90.16%)
  Preprocessed:                 543 /  551 (98.55%)
Local storage:
  Cache size (GiB):             5.0 /  5.0 (99.92%)
  Files:                      74554
  Hits:                        5611 / 5618 (99.88%)
  Misses:                         7 / 5618 ( 0.12%)
  Reads:                      11237
  Writes:                        14
ninja -C llvm.build -j64 exited with return code 1.
@@@STEP_FAILURE@@@
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-clang-flang/build/../llvm.src/offload/ci/openmp-offload-amdgpu-clang-flang.py", line 44, in <module>
    w.run_ninja(builddir=llvmbuilddir, ccache_stats=True)
  File "/home/botworker/bbot/amdgpu-clang-flang/llvm.src/.ci/buildbot/worker.py", line 269, in run_ninja
    run_command(cmd, **kwargs)
  File "/home/botworker/bbot/amdgpu-clang-flang/llvm.src/.ci/buildbot/worker.py", line 132, in run_command
Step 7 (compile-openmp) failure: compile-openmp (failure)
...
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
-- Configuring done (4.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/botworker/bbot/amdgpu-clang-flang/build/llvm.build/runtimes/builtins-bins
[ 99%/44.750s :: 38->4->8697 (of 8738)] 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 /opt/rh/gcc-toolset-13/root/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/amdgpu-clang-flang/build/llvm.build/tools/llvm-calc-occupancy -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy -I/home/botworker/bbot/amdgpu-clang-flang/build/llvm.build/include -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/include -I/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/lib/Target/AMDGPU -I/home/botworker/bbot/amdgpu-clang-flang/build/llvm.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-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -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 -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -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/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
/home/botworker/bbot/amdgpu-clang-flang/llvm.src/llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp: In function ‘int main(int, char**)’:
/home/botworker/bbot/amdgpu-clang-flang/llvm.src/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);
      | 
[ 99%/45.743s :: 38->2->8699 (of 8738)] Linking CXX shared library lib/libFortranLower.so.24.0git
ninja: build stopped: subcommand failed.
Running: ccache -sv
Cache directory:              /home/botworker/.cache/ccache
Config file:                  /home/botworker/.config/ccache/ccache.conf
System config file:           /usr/local/etc/ccache.conf
Stats updated:                Thu Jul 30 13:18:36 2026
Cacheable calls:               5618 / 5621 (99.95%)
  Hits:                        5611 / 5618 (99.88%)
    Direct:                    5068 / 5611 (90.32%)
    Preprocessed:               543 / 5611 ( 9.68%)
  Misses:                         7 / 5618 ( 0.12%)
Uncacheable calls:                3 / 5621 ( 0.05%)
  Compilation failed:             1 /    3 (33.33%)
  Unsupported code directive:     2 /    3 (66.67%)
Successful lookups:
  Direct:                      5068 / 5621 (90.16%)
  Preprocessed:                 543 /  551 (98.55%)
Local storage:
  Cache size (GiB):             5.0 /  5.0 (99.92%)
  Files:                      74554
  Hits:                        5611 / 5618 (99.88%)
  Misses:                         7 / 5618 ( 0.12%)
  Reads:                      11237
  Writes:                        14
ninja -C llvm.build -j64 exited with return code 1.
Traceback (most recent call last):
  File "/home/botworker/bbot/amdgpu-clang-flang/build/../llvm.src/offload/ci/openmp-offload-amdgpu-clang-flang.py", line 44, in <module>
    w.run_ninja(builddir=llvmbuilddir, ccache_stats=True)
  File "/home/botworker/bbot/amdgpu-clang-flang/llvm.src/.ci/buildbot/worker.py", line 269, in run_ninja
    run_command(cmd, **kwargs)
  File "/home/botworker/bbot/amdgpu-clang-flang/llvm.src/.ci/buildbot/worker.py", line 132, in run_command
    subprocess.check_call(cmd, shell=shell, env=env, **kwargs)

```

</details>

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


More information about the llvm-commits mailing list