Hello,
I'm trying to compile roctracer from source with this command:
build# cmake .. -DCMAKE_MODULE_PATH=/opt/rocm-6.0.2/lib64/cmake/hip/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/rocm-6.0.2 -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm-6.0.2 -DCPACK_GENERATOR=TGZ
-- Code Object Manager found at /opt/rocm-6.0.2/lib64/cmake/amd_comgr.
-----------Dest-name: rocm-6.0.2
------Install-prefix: /opt/rocm-6.0.2
-----------CPACK-dir: /opt
Using CPACK_PACKAGE_VERSION 4.1.0.60002
Using CPACK_DEBIAN_PACKAGE_RELEASE 63~20.04
Using CPACK_RPM_PACKAGE_RELEASE local
RESULT_VARIABLE 0 OUTPUT_VARIABLE:
CPACK_RPM_PACKAGE_RELEASE: local
-- Configuring done (1.0s)
-- Generating done (0.1s)
-- Build files have been written to: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/build
and I get the following error:
make
[ 2%] Building CXX object src/CMakeFiles/util.dir/util/debug.cpp.o
[ 4%] Building CXX object src/CMakeFiles/util.dir/util/util.cpp.o
[ 6%] Linking CXX static library libutil.a
[ 6%] Built target util
[ 8%] Generating hsa_prof_str.h,hsa_prof_str.inline.h...
[ 10%] Generating hip_ostream_ops.h...
[ 12%] Generating hsa_ostream_ops.h...
[ 14%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/backward_compat.cpp.o
[ 16%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/correlation_id.cpp.o
[ 18%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/hsa_support.cpp.o
[ 20%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/roctracer.cpp.o
In file included from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:48:
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ~~^~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^~~~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ~~~~^~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^~~~~~~~
In file included from /usr/include/c++/13.2.0/tuple:38,
from /usr/include/c++/13.2.0/bits/std_thread.h:39,
from /usr/include/c++/13.2.0/thread:45,
from /opt/rocm-6.0.2/include/hip/hip_runtime.h:54,
from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/inc/roctracer_hip.h:26,
from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:22:
In member function ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::conditional_t<std::_and<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::nonesuch&&>) [with _T1 = void ()(unsigned int, unsigned int, const void, void); _T2 = void]’,
inlined from ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/usr/include/c++/13.2.0/bits/stl_pair.h:743:15: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
743 | first = std::forward(__p.first);
| ~~^~~~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^~~~~~~~
In member function ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::conditional_t<std::_and<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::nonesuch&&>) [with _T1 = void ()(unsigned int, unsigned int, const void, void); _T2 = void]’,
inlined from ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/usr/include/c++/13.2.0/bits/stl_pair.h:744:16: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
744 | second = std::forward(__p.second);
| ~^~~~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^~~~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ~~^~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224
372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table;
| ^~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ~~~~^~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224
372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table;
| ^~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
63 | entry.data = T{std::forward(args)...};
| ~~~^~~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224
372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table;
| ^~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ~~^~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296
373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table;
| ^~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ~~~~^~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296
373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table;
| ^~~~~~
In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’,
inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
63 | entry.data = T{std::forward(args)...};
| ~~~^~~~~~~~
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296
373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table;
| ^~~~~~
cc1plus: all warnings being treated as errors
make[2]: [src/CMakeFiles/roctracer.dir/build.make:143: src/CMakeFiles/roctracer.dir/roctracer/roctracer.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:246: src/CMakeFiles/roctracer.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Any suggestion how to fix this error ?
Thanks,
Operating System
Slackware 15.0 x86_64
CPU
Intel(R) Xeon(R) CPU E5620 @ 2.40GH
GPU
AMD Radeon RX 7900 XTX
ROCm Version
ROCm 6.0.0
ROCm Component
roctracer
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
Problem Description
Hello, I'm trying to compile roctracer from source with this command:
build# cmake .. -DCMAKE_MODULE_PATH=/opt/rocm-6.0.2/lib64/cmake/hip/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/rocm-6.0.2 -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm-6.0.2 -DCPACK_GENERATOR=TGZ -- Code Object Manager found at /opt/rocm-6.0.2/lib64/cmake/amd_comgr. -----------Dest-name: rocm-6.0.2 ------Install-prefix: /opt/rocm-6.0.2 -----------CPACK-dir: /opt Using CPACK_PACKAGE_VERSION 4.1.0.60002 Using CPACK_DEBIAN_PACKAGE_RELEASE 63~20.04 Using CPACK_RPM_PACKAGE_RELEASE local RESULT_VARIABLE 0 OUTPUT_VARIABLE: CPACK_RPM_PACKAGE_RELEASE: local -- Configuring done (1.0s) -- Generating done (0.1s) -- Build files have been written to: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/build
and I get the following error:
make
[ 2%] Building CXX object src/CMakeFiles/util.dir/util/debug.cpp.o [ 4%] Building CXX object src/CMakeFiles/util.dir/util/util.cpp.o [ 6%] Linking CXX static library libutil.a [ 6%] Built target util [ 8%] Generating hsa_prof_str.h,hsa_prof_str.inline.h... [ 10%] Generating hip_ostream_ops.h... [ 12%] Generating hsa_ostream_ops.h... [ 14%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/backward_compat.cpp.o [ 16%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/correlation_id.cpp.o [ 18%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/hsa_support.cpp.o [ 20%] Building CXX object src/CMakeFiles/roctracer.dir/roctracer/roctracer.cpp.o In file included from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:48: In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/usr/include/c++/13.2.0/bits/stl_pair.h:743:15: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
743 | first = std::forward(__p.first);
| )’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>; Args = {void ()(unsigned int, unsigned int, const void, void), void}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:507:42:
/usr/include/c++/13.2.0/bits/stl_pair.h:744:16: error: array subscript ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, {anonymous}::NeverStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 5, {anonymous}::NeverStopped> [1]’} [-Werror=array-bounds=]
744 | second = std::forward(__p.second);
| )’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408
371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table;
| ^::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 379, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:655:40:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 3, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
63 | entry.data = T{std::forward(args)...};
| )’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224
372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table;
| ^::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:60:33: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
60 | std::unique_lock lock(entry.mutex);
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:61:32: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
61 | if (!entry.enabled.exchange(true, std::memory_order_relaxed))
| ::Register(T&, uint32_t, Args ...) const [with T = roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>; Args = {roctracer::MemoryPool}; Tables = {roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped>, roctracer::util::RegistrationTable<std::pair<void ()(unsigned int, unsigned int, const void, void), void>, 6, {anonymous}::IsStopped>}]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:451:19,
inlined from ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:647:38:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16: error: array subscript ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 206, {anonymous}::IsStopped>[0]’ is partly outside array bounds of ‘{anonymous}::ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, {anonymous}::IsStopped> [1]’ {aka ‘roctracer::util::RegistrationTable<roctracer::MemoryPool, 4, {anonymous}::IsStopped> [1]’} [-Werror=array-bounds=]
63 | entry.data = T{std::forward(args)...};
| )’:
/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296
373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table;
| ^
~~^~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408 371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table; | ^~~~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~~~^~~~~~~/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:371:64: note: object ‘{anonymous}::roctx_api_callback_table’ of size 408 371 | CallbackRegistrationTable<ACTIVITY_DOMAIN_ROCTX, NeverStopped> roctx_api_callback_table; | ^~~~~~~~ In file included from /usr/include/c++/13.2.0/tuple:38, from /usr/include/c++/13.2.0/bits/std_thread.h:39, from /usr/include/c++/13.2.0/thread:45, from /opt/rocm-6.0.2/include/hip/hip_runtime.h:54, from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/inc/roctracer_hip.h:26, from /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:22: In member function ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::conditional_t<std::_and<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::nonesuch&&>) [with _T1 = void ()(unsigned int, unsigned int, const void, void); _T2 = void]’, inlined from ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16, inlined from ‘void {anonymous}::RegistrationTableGroup~~^~~~~~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void~~~~~~~ In member function ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::conditional_t<std::_and<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::nonesuch&&>) [with _T1 = void ()(unsigned int, unsigned int, const void, void); _T2 = void]’, inlined from ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {void ()(unsigned int, unsigned int, const void, void), void}; T = std::pair<void ()(unsigned int, unsigned int, const void, void), void>; unsigned int N = 6; IsStopped = {anonymous}::IsStopped]’ at /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/registration_table.h:63:16, inlined from ‘void {anonymous}::RegistrationTableGroup~^~~~~~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_callback_impl(roctracer_domain_t, uint32_t, roctracer_rtapi_callback_t, void~~~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~^~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224 372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table; | ^~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~~~^~~~~~~/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:372:63: note: object ‘{anonymous}::hip_ops_activity_table’ of size 224 372 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HIP_OPS, IsStopped> hip_ops_activity_table; | ^~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~~^~~~~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~^~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296 373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table; | ^~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~~~^~~~~~~/mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t)’: /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp:373:63: note: object ‘{anonymous}::hsa_ops_activity_table’ of size 296 373 | ActivityRegistrationTable<ACTIVITY_DOMAIN_HSA_OPS, IsStopped> hsa_ops_activity_table; | ^~~~~~ In member function ‘void roctracer::util::RegistrationTable<T, N, IsStopped>::Register(uint32_t, Args ...) [with Args = {roctracer::MemoryPool}; T = roctracer::MemoryPool; unsigned int N = 206; IsStopped = {anonymous}::IsStopped]’, inlined from ‘void {anonymous}::RegistrationTableGroup~~~^~~~~~~~ /mnt/hd/share/testamd/rocm/rocm-git/ll/roctracer/src/roctracer/roctracer.cpp: In function ‘void roctracer_enable_activity_impl(roctracer_domain_t, uint32_t, roctracer_pool_t~~~~~ cc1plus: all warnings being treated as errors make[2]: [src/CMakeFiles/roctracer.dir/build.make:143: src/CMakeFiles/roctracer.dir/roctracer/roctracer.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:246: src/CMakeFiles/roctracer.dir/all] Error 2 make: *** [Makefile:156: all] Error 2Any suggestion how to fix this error ?
Thanks,
Operating System
Slackware 15.0 x86_64
CPU
Intel(R) Xeon(R) CPU E5620 @ 2.40GH
GPU
AMD Radeon RX 7900 XTX
ROCm Version
ROCm 6.0.0
ROCm Component
roctracer
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response