Skip to content

Commit

Permalink
fix type for emulated v2 block reads
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Jan 22, 2024
1 parent a24a5b0 commit 38d03c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/99_matrixexperiments/matrix_helpers.cl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int8 load_a_rowmajor_d16_m8_k16_sg8(global ushort* A, int rowStart, int colStart
// The first tile is returned the first components of the return value, the the next tile, etc.
int16 load_a_rowmajor_d16_m8_k16v2_sg8(global ushort* A, int rowStart, int colStart, int stride)
{
int16 ret;
uint16 ret;

global uint* A_ui = (global uint*)A;
int offset_ui = rowStart * stride / 2 + colStart / 2;
Expand All @@ -235,7 +235,7 @@ int16 load_a_rowmajor_d16_m8_k16v2_sg8(global ushort* A, int rowStart, int colSt
ret.s6e = intel_sub_group_block_read2(A_ui + offset_ui); offset_ui += stride / 2;
ret.s7f = intel_sub_group_block_read2(A_ui + offset_ui); offset_ui += stride / 2;

return ret;
return as_int16(ret);
}

// M rows x K columns
Expand Down Expand Up @@ -302,7 +302,7 @@ short8 load_a_rowmajor_d16_m8_k16_sg16(global ushort* A, int rowStart, int colSt
// The first tile is returned the first components of the return value, the the next tile, etc.
short16 load_a_rowmajor_d16_m8_k16v2_sg16(global ushort* A, int rowStart, int colStart, int stride)
{
short16 ret;
ushort16 ret;

int offset = rowStart * stride + colStart;
ret.s08 = intel_sub_group_block_read_us2(A + offset); offset += stride / 2;
Expand All @@ -314,7 +314,7 @@ short16 load_a_rowmajor_d16_m8_k16v2_sg16(global ushort* A, int rowStart, int co
ret.s6e = intel_sub_group_block_read_us2(A + offset); offset += stride / 2;
ret.s7f = intel_sub_group_block_read_us2(A + offset); offset += stride / 2;

return ret;
return as_short16(ret);
}

// K rows x N columns:
Expand Down

0 comments on commit 38d03c0

Please sign in to comment.