From f737f52a2468d155ac95cc4895500cb3951e3098 Mon Sep 17 00:00:00 2001 From: "Ding, Yi1" Date: Wed, 24 Jul 2024 01:52:55 +0000 Subject: [PATCH] XeTLA Fix Global 1D Store --- include/subgroup/tile/impl/payload_xe.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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