diff --git a/include/subgroup/tile/impl/payload_xe.hpp b/include/subgroup/tile/impl/payload_xe.hpp index 0968f4bc6..e6843561f 100644 --- a/include/subgroup/tile/impl/payload_xe.hpp +++ b/include/subgroup/tile/impl/payload_xe.hpp @@ -467,10 +467,9 @@ struct mem_payload_t< uint32_t offset_y = surface_offset_y; width_in_elems = surface_width; height_in_elems = surface_height; - payload_bytes = mem_transpose ? (surface_offset_x - 1) * pitch_in_bytes + - surface_offset_y * sizeof(dtype) - : (surface_offset_y - 1) * pitch_in_bytes + - surface_offset_x * sizeof(dtype); + payload_bytes = mem_transpose + ? (surface_width - 1) * pitch_in_bytes + surface_height * sizeof(dtype) + : (surface_height - 1) * pitch_in_bytes + surface_width * sizeof(dtype); base_offset = mem_transpose ? offset_x * pitch_in_bytes + offset_y * sizeof(dtype) : offset_y * pitch_in_bytes + offset_x * sizeof(dtype); @@ -2313,4 +2312,4 @@ struct prefetch_payload_t< __XETLA_API void update_tdesc([[maybe_unused]] int offset) {} }; -} // namespace gpu::xetla::subgroup \ No newline at end of file +} // namespace gpu::xetla::subgroup