Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYCL Unittests build fail in SYCL Nightly #13737

Closed
uditagarwal97 opened this issue May 10, 2024 · 3 comments · Fixed by #13738
Closed

SYCL Unittests build fail in SYCL Nightly #13737

uditagarwal97 opened this issue May 10, 2024 · 3 comments · Fixed by #13738
Labels
bug Something isn't working

Comments

@uditagarwal97
Copy link
Contributor

Describe the bug

Run: https://github.com/intel/llvm/actions/runs/9026632746/job/24804245927

tools/sycl/unittests/assert/CMakeFiles/AssertTests.dir/assert.cpp.o.d -o tools/sycl/unittests/assert/CMakeFiles/AssertTests.dir/assert.cpp.o -c /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp
In file included from /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp:31:
In member function 'void sycl::_V1::unittest::PiProperty::updateNativeType()',
    inlined from 'sycl::_V1::unittest::PiProperty::PiProperty(const std::string&, std::vector<char>, uint32_t)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:33:21,
    inlined from 'void sycl::_V1::unittest::setKernelUsesAssert(const std::vector<std::__cxx11::basic_string<char> >&, PiPropertySet&)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:395:20:
/__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:57:28: error: array subscript 'uint32_t {aka unsigned int}[0]' is partly outside array bounds of 'char [2]' [-Werror=array-bounds]
   57 |                            *((uint32_t *)MData.data())};
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/12/bits/c++allocator.h:33,
                 from /usr/include/c++/12/bits/allocator.h:46,
                 from /usr/include/c++/12/string:41,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/ios:42,
                 from /usr/include/c++/12/ostream:38,
                 from /__w/llvm/llvm/build/include/sycl/backend_types.hpp:13,
                 from /__w/llvm/llvm/build/include/sycl/backend/opencl.hpp:11,
                 from /__w/llvm/llvm/src/sycl/unittests/assert/assert.cpp:24:
In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = char]',
    inlined from 'static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = char]' at /usr/include/c++/12/bits/alloc_traits.h:464:28,
    inlined from 'std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:378:33,
    inlined from 'void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const char*; _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:1687:25,
    inlined from 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>]' at /usr/include/c++/12/bits/stl_vector.h:677:21,
    inlined from 'void sycl::_V1::unittest::setKernelUsesAssert(const std::vector<std::__cxx11::basic_string<char> >&, PiPropertySet&)' at /__w/llvm/llvm/src/sycl/unittests/helpers/PiImage.hpp:395:20:
/usr/include/c++/12/bits/new_allocator.h:137:55: note: object of size 2 allocated by 'operator new'
  137 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));

To reproduce

DPC++ commit: 1a60087

Environment

No response

Additional context

No response

@uditagarwal97 uditagarwal97 added the bug Something isn't working label May 10, 2024
@uditagarwal97
Copy link
Contributor Author

@aelovikov-intel For some reason, we see this failure only in SYCL Nightly, not in post or pre commit. Do we have any special configuration for Nightly builds?

@JackAKirk
Copy link
Contributor

From the timing of this failing today, I think it is likely due to #13619
I'm not absolutely 100% though. AMD build/test passes. Probably the uplift to gcc12 is breaking other builds.

@JackAKirk
Copy link
Contributor

From the timing of this failing today, I think it is likely due to #13619 I'm not absolutely 100% though. AMD build/test passes. Probably the uplift to gcc12 is breaking other builds.

Sounds like it is at least partially explained by gcc12 catching bugs that earlier versions didn't: #13738
I'll read more into the failures.

aelovikov-intel pushed a commit that referenced this issue May 10, 2024
This value is the size of the data associated with the property, but for
`PI_PROPERTY_TYPE_UINT32`, the data is always `nullptr` so this should
be 0.

I suspect the initial patch meant to construct a vector of 4 values of
0, but that initializer list construct a vector of 2 values with 4 and 0
instead.

Should fix: #13737
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants