Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ int main(int argc, char *argv[]) {
histogram_CPU(width, height, srcY, cpuHistogram);

sycl::image<2> Img(srcY, image_channel_order::rgba,
image_channel_type::unsigned_int32,
range<2>{width / sizeof(uint4), height});
image_channel_type::unsigned_int8,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind explaining the fix? thanks

Copy link
Contributor Author

@fineg74 fineg74 Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not an expert in image and image accessors so I have only rough ideas what went wrong: We created a buffer of uint8 with size of IMAGE_WIDTHxIMAGE_HEIGHTxsizeof(int) i.e. you can think of image of IMAGE_WIDTHxIMAGE_HEIGHT where every pixel is an int i.e. 4 bytes and here we creating an image that will use this buffer, we say that we have for channels (rgba parameter) and every channel is int32 which is incorrect since buffer was allocated with uint8 for every channel. Later we reading it as vector of uint8 and it looks like some internal mapping inside an image accessor leads it to read memory beyond buffer memory causing crash on newer gpu driver
BTW, we have bunch of other tests using images that are either crashing or failing that I will try to address it in follow up PR if I manage to fix it on our side (I am not sure whom to blame yet)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok i see thanks, yeah there's definitely a type mismatch with srcY

range<2>{width / sizeof(uchar4), height});

// Start Timer
esimd_test::Timer timer;
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/ESIMD/histogram_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ int main(int argc, char *argv[]) {
histogram_CPU(width, height, srcY, cpuHistogram);

sycl::image<2> Img(srcY, image_channel_order::rgba,
image_channel_type::unsigned_int32,
range<2>{width / sizeof(uint4), height});
image_channel_type::unsigned_int8,
range<2>{width / sizeof(uchar4), height});

// Start Timer
esimd_test::Timer timer;
Expand Down
Loading