From 933edf3bddbed39b78d201d6e63d5c7dc513a11c Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Fri, 10 May 2024 16:03:29 +0100 Subject: [PATCH] [SYCL] Fix assert unit test warning (#13738) 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: https://github.com/intel/llvm/issues/13737 --- sycl/unittests/helpers/PiImage.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/unittests/helpers/PiImage.hpp b/sycl/unittests/helpers/PiImage.hpp index 1c5890588d210..c34e3d832795c 100644 --- a/sycl/unittests/helpers/PiImage.hpp +++ b/sycl/unittests/helpers/PiImage.hpp @@ -392,7 +392,7 @@ inline void setKernelUsesAssert(const std::vector &Names, PiPropertySet &Set) { PiArray Value; for (const std::string &N : Names) - Value.push_back({N, {4, 0}, PI_PROPERTY_TYPE_UINT32}); + Value.push_back({N, {0, 0, 0, 0}, PI_PROPERTY_TYPE_UINT32}); Set.insert(__SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED, std::move(Value)); }