Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit c3d779a

Browse files
authored
XeTLA Fix Global 1D Store (#318)
1 parent 5986d16 commit c3d779a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

include/subgroup/tile/impl/payload_xe.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,9 @@ struct mem_payload_t<
467467
uint32_t offset_y = surface_offset_y;
468468
width_in_elems = surface_width;
469469
height_in_elems = surface_height;
470-
payload_bytes = mem_transpose ? (surface_offset_x - 1) * pitch_in_bytes +
471-
surface_offset_y * sizeof(dtype)
472-
: (surface_offset_y - 1) * pitch_in_bytes +
473-
surface_offset_x * sizeof(dtype);
470+
payload_bytes = mem_transpose
471+
? (surface_width - 1) * pitch_in_bytes + surface_height * sizeof(dtype)
472+
: (surface_height - 1) * pitch_in_bytes + surface_width * sizeof(dtype);
474473
base_offset = mem_transpose
475474
? offset_x * pitch_in_bytes + offset_y * sizeof(dtype)
476475
: offset_y * pitch_in_bytes + offset_x * sizeof(dtype);
@@ -2313,4 +2312,4 @@ struct prefetch_payload_t<
23132312
__XETLA_API void update_tdesc([[maybe_unused]] int offset) {}
23142313
};
23152314

2316-
} // namespace gpu::xetla::subgroup
2315+
} // namespace gpu::xetla::subgroup

0 commit comments

Comments
 (0)