compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

Linking failure (due to -Werror) with LTO

Open ArchangeGabriel opened this issue 3 years ago • 7 comments

When compiling with LTO, the build ultimately fails like this:

/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/drm/i915_drm.h:2951: error: type ‘struct drm_i915_gem_create_ext’ violates the C++ One Definition Rule [-Werror=odr]
 2951 | struct drm_i915_gem_create_ext {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/dg1/drm/i915_drm.h:726: note: a different type is defined in another translation unit
  726 | struct drm_i915_gem_create_ext {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/drm/i915_drm.h:2971: note: the first difference of corresponding definitions is field ‘flags’
 2971 |         __u32 flags;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/dg1/drm/i915_drm.h:740: note: a field with different name is defined in another translation unit
  740 |         __u32 pad;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/drm/i915_drm.h:2951: error: type ‘struct drm_i915_gem_create_ext’ violates the C++ One Definition Rule [-Werror=odr]
 2951 | struct drm_i915_gem_create_ext {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/dg1/drm/i915_drm.h:726: note: a different type is defined in another translation unit
  726 | struct drm_i915_gem_create_ext {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/drm/i915_drm.h:2971: note: the first difference of corresponding definitions is field ‘flags’
 2971 |         __u32 flags;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.12.22749/third_party/uapi/dg1/drm/i915_drm.h:740: note: a field with different name is defined in another translation unit
  740 |         __u32 pad;
      | 
lto1: all warnings being treated as errors

ArchangeGabriel avatar Mar 28 '22 21:03 ArchangeGabriel

Hi @ArchangeGabriel. Thanks for reporting the issue. I've added this to our queue.

JablonskiMateusz avatar Apr 26 '22 09:04 JablonskiMateusz

@ArchangeGabriel could you retry with https://github.com/intel/compute-runtime/commit/78c96db2faacdc3406a24a91f017aeae40b7ca54 ?

JablonskiMateusz avatar Jul 18 '22 16:07 JablonskiMateusz

With that commit on top of latest release, I get this:

/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:43: error: type ‘struct MockOsLibrary’ violates the C++ One Definition Rule [-Werror=odr]
   43 | struct MockOsLibrary : public OsLibraryUtil {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: a type with the same name but different base type is defined in another translation unit
   24 | class MockOsLibrary : public NEO::OsLibrary {
      |       ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:42: note: type name ‘L0::ult::OsLibraryUtil’ should match type name ‘NEO::OsLibrary’
   42 | class OsLibraryUtil : public OsLibrary {};
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/shared/source/os_interface/os_library.h:27:7: note: the incompatible type is defined here
   27 | class OsLibrary {
      |       ^
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:49: error: type of ‘__dt_del ’ does not match original declaration [-Werror=lto-type-mismatch]
   49 |     ~MockOsLibrary() override = default;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: ‘__dt_del ’ was previously declared here
   24 | class MockOsLibrary : public NEO::OsLibrary {
      |       ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:49: error: type of ‘__dt_comp ’ does not match original declaration [-Werror=lto-type-mismatch]
   49 |     ~MockOsLibrary() override = default;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: ‘__dt_comp ’ was previously declared here
   24 | class MockOsLibrary : public NEO::OsLibrary {
      |       ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:49: error: type of ‘__dt_base ’ does not match original declaration [-Werror=lto-type-mismatch]
   49 |     ~MockOsLibrary() override = default;
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: ‘__dt_base ’ was previously declared here
   24 | class MockOsLibrary : public NEO::OsLibrary {
      |       ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:24:7: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:53: error: type of ‘isLoaded’ does not match original declaration [-Werror=lto-type-mismatch]
   53 |     bool isLoaded() override {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:33:10: note: ‘isLoaded’ was previously declared here
   33 |     bool isLoaded() override {
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:33:10: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/sysman/firmware_util/mock_fw_util_fixture.h:50: error: type of ‘getProcAddress’ does not match original declaration [-Werror=lto-type-mismatch]
   50 |     void *getProcAddress(const std::string &procName) override {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:29:11: note: ‘getProcAddress’ was previously declared here
   29 |     void *getProcAddress(const std::string &procName) override {
      |           ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/tools/test/unit_tests/sources/metrics/test_metric_oa_initialization.cpp:29:11: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:616:41:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.1.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/event/event.cpp:729:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/command_queue.cpp:434:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:648:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.28.23726/opencl/source/command_queue/enqueue_common.h:619:61:
/usr/include/c++/12.1.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_driver_handle.h:20:8: error: type ‘struct WhiteBox’ violates the C++ One Definition Rule [-Werror=odr]
   20 | struct WhiteBox<::L0::DriverHandle> : public ::L0::DriverHandleImp {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/white_box.h:14:8: note: a type with the same name but different base type is defined in another translation unit
   14 | struct WhiteBox : public Type {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/source/driver/driver_handle_imp.h:21:8: note: type name ‘L0::DriverHandleImp’ should match type name ‘L0::DriverHandle’
   21 | struct DriverHandleImp : public DriverHandle {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/source/driver/driver_handle.h:31:8: note: the incompatible type is defined here
   31 | struct DriverHandle : _ze_driver_handle_t {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/white_box.h:14: error: type ‘struct WhiteBox’ violates the C++ One Definition Rule [-Werror=odr]
   14 | struct WhiteBox : public Type {
      | 
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:42:8: note: a type with the same name but different base type is defined in another translation unit
   42 | struct WhiteBox<::L0::Kernel> : public ::L0::KernelImp {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/source/kernel/kernel.h:97:8: note: type name ‘L0::Kernel’ should match type name ‘L0::KernelImp’
   97 | struct Kernel : _ze_kernel_handle_t, virtual NEO::DispatchKernelEncoderI {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/source/kernel/kernel_imp.h:31:8: note: the incompatible type is defined here
   31 | struct KernelImp : Kernel {
      |        ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: error: ‘__dt_del ’ violates the C++ One Definition Rule [-Werror=odr]
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: error: ‘__dt_del ’ violates the C++ One Definition Rule [-Werror=odr]
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: note: ‘__dt_del ’ was previously declared here
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: error: ‘__dt_comp ’ violates the C++ One Definition Rule [-Werror=odr]
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: error: ‘__dt_comp ’ violates the C++ One Definition Rule [-Werror=odr]
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:134:5: note: ‘__dt_comp ’ was previously declared here
  134 |     ~Mock() override {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:108:5: error: ‘__ct_comp ’ violates the C++ One Definition Rule [-Werror=odr]
  108 |     Mock() : BaseClass(nullptr) {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:108:5: error: ‘__ct_comp ’ violates the C++ One Definition Rule [-Werror=odr]
  108 |     Mock() : BaseClass(nullptr) {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:108:5: note: ‘__ct_comp ’ was previously declared here
  108 |     Mock() : BaseClass(nullptr) {
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:104:5: error: ‘setArgRedescribedImage’ violates the C++ One Definition Rule [-Werror=odr]
  104 |     ADDMETHOD(setArgRedescribedImage, ze_result_t, true, ZE_RESULT_SUCCESS,
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:104:5: error: ‘setArgRedescribedImage’ violates the C++ One Definition Rule [-Werror=odr]
  104 |     ADDMETHOD(setArgRedescribedImage, ze_result_t, true, ZE_RESULT_SUCCESS,
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:104:5: note: ‘setArgRedescribedImage’ was previously declared here
  104 |     ADDMETHOD(setArgRedescribedImage, ze_result_t, true, ZE_RESULT_SUCCESS,
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:144:10: error: ‘printPrintfOutput’ violates the C++ One Definition Rule [-Werror=odr]
  144 |     void printPrintfOutput() override {
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:144:10: error: ‘printPrintfOutput’ violates the C++ One Definition Rule [-Werror=odr]
  144 |     void printPrintfOutput() override {
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:144:10: note: ‘printPrintfOutput’ was previously declared here
  144 |     void printPrintfOutput() override {
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:140:17: error: ‘setArgBufferWithAlloc’ violates the C++ One Definition Rule [-Werror=odr]
  140 |     ze_result_t setArgBufferWithAlloc(uint32_t argIndex, uintptr_t argVal, NEO::GraphicsAllocation *allocation) override {
      |                 ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:140:17: error: ‘setArgBufferWithAlloc’ violates the C++ One Definition Rule [-Werror=odr]
  140 |     ze_result_t setArgBufferWithAlloc(uint32_t argIndex, uintptr_t argVal, NEO::GraphicsAllocation *allocation) override {
      |                 ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:140:17: note: ‘setArgBufferWithAlloc’ was previously declared here
  140 |     ze_result_t setArgBufferWithAlloc(uint32_t argIndex, uintptr_t argVal, NEO::GraphicsAllocation *allocation) override {
      |                 ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:139:10: error: ‘evaluateIfRequiresGenerationOfLocalIdsByRuntime’ violates the C++ One Definition Rule [-Werror=odr]
  139 |     void evaluateIfRequiresGenerationOfLocalIdsByRuntime(const NEO::KernelDescriptor &kernelDescriptor) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:139:10: error: ‘evaluateIfRequiresGenerationOfLocalIdsByRuntime’ violates the C++ One Definition Rule [-Werror=odr]
  139 |     void evaluateIfRequiresGenerationOfLocalIdsByRuntime(const NEO::KernelDescriptor &kernelDescriptor) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:139:10: note: ‘evaluateIfRequiresGenerationOfLocalIdsByRuntime’ was previously declared here
  139 |     void evaluateIfRequiresGenerationOfLocalIdsByRuntime(const NEO::KernelDescriptor &kernelDescriptor) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:138:10: error: ‘setBufferSurfaceState’ violates the C++ One Definition Rule [-Werror=odr]
  138 |     void setBufferSurfaceState(uint32_t argIndex, void *address, NEO::GraphicsAllocation *alloc) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:138:10: error: ‘setBufferSurfaceState’ violates the C++ One Definition Rule [-Werror=odr]
  138 |     void setBufferSurfaceState(uint32_t argIndex, void *address, NEO::GraphicsAllocation *alloc) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:138:10: note: ‘setBufferSurfaceState’ was previously declared here
  138 |     void setBufferSurfaceState(uint32_t argIndex, void *address, NEO::GraphicsAllocation *alloc) override {}
      |          ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:102:5: error: ‘getProperties’ violates the C++ One Definition Rule [-Werror=odr]
  102 |     ADDMETHOD_NOBASE(getProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_kernel_properties_t * pKernelProperties))
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:102:5: error: ‘getProperties’ violates the C++ One Definition Rule [-Werror=odr]
  102 |     ADDMETHOD_NOBASE(getProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_kernel_properties_t * pKernelProperties))
      |     ^
/build/intel-compute-runtime/src/compute-runtime-22.28.23726/level_zero/core/test/unit_tests/mocks/mock_kernel.h:102:5: note: ‘getProperties’ was previously declared here
  102 |     ADDMETHOD_NOBASE(getProperties, ze_result_t, ZE_RESULT_SUCCESS, (ze_kernel_properties_t * pKernelProperties))
      |     ^

ArchangeGabriel avatar Jul 21 '22 18:07 ArchangeGabriel

could you share more details of your build environment? e.g. compiler version, OS version etc

JablonskiMateusz avatar Jul 22 '22 11:07 JablonskiMateusz

Sure, you can find most information from the package page: https://archlinux.org/packages/community/x86_64/intel-compute-runtime/

So OS is Arch (no version), compiler is gcc 12.1.0, cmake command is at https://github.com/archlinux/svntogit-community/blob/packages/intel-compute-runtime/trunk/PKGBUILD#L29. Please tell me if you need specific information other than that.

ArchangeGabriel avatar Jul 22 '22 12:07 ArchangeGabriel

FTR, with current release it reduces to:

In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
[100%] Built target ze_intel_gpu
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:628:41:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 
In member function ‘load’,
    inlined from ‘__conv_op ’ at /usr/include/c++/12.2.0/bits/atomic_base.h:348:0,
    inlined from ‘getTaskLevel’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/event/event.cpp:732:0,
    inlined from ‘getTaskLevelFromWaitList’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/command_queue.cpp:492:56,
    inlined from ‘isTaskLevelUpdateRequired’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:660:64,
    inlined from ‘obtainTaskLevelAndBlockedStatus’ at /build/intel-compute-runtime/src/compute-runtime-22.43.24595.30/opencl/source/command_queue/enqueue_common.h:631:61:
/usr/include/c++/12.2.0/bits/atomic_base.h:488: error: ‘__atomic_load_4’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  488 |         return __atomic_load_n(&_M_i, int(__m));
      | 

ArchangeGabriel avatar Jan 07 '23 18:01 ArchangeGabriel

@ArchangeGabriel remaining ODR issues were fixed in https://github.com/intel/compute-runtime/commit/d2f1cf98d715ee2d00733bd8a7c0a9b18ae72e93

Mentioned __atomic_load issues look like g++12 issue, it comes from std::atomic<int>::load function

JablonskiMateusz avatar Jul 05 '23 08:07 JablonskiMateusz