Skip to content

Commit

Permalink
[SYCL] Fix assert unit test warning (#13738)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
npmiller authored May 10, 2024
1 parent 59e8ee7 commit 933edf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sycl/unittests/helpers/PiImage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ inline void setKernelUsesAssert(const std::vector<std::string> &Names,
PiPropertySet &Set) {
PiArray<PiProperty> 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));
}

Expand Down

0 comments on commit 933edf3

Please sign in to comment.