Skip to content

Commit

Permalink
[GPU] Fix oob in fc bf tiled for BMG
Browse files Browse the repository at this point in the history
  • Loading branch information
p-durandin committed Jan 10, 2025
1 parent 34f7831 commit d77cb6b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ inline void FUNC(fc_bf_tiled_kernel_default)(
// =====================================================================================================================================
// Main computation loop
uint iterations = MAIN_LOOP_ELEMENTS_COUNT / (TILE_IFM * SIMD);
const uint B_PITCH_MAX = min((uint)((BATCH_SIZE-out_b) * (SIMD/INPUT0_TYPE_SIZE)), (uint)TILE_IN_B_PITCH);
const uint B_PITCH_MAX = (INPUT_ELEMENTS_COUNT % TILE_IN_B_PITCH) ?
min((uint)((BATCH_SIZE-out_b) * (SIMD/INPUT0_TYPE_SIZE)), (uint)TILE_IN_B_PITCH) : TILE_IN_B_PITCH;
__attribute__((opencl_unroll_hint(1)))
for (uint ni = 0; ni < iterations; ++ni) {
// Load input.
Expand Down

0 comments on commit d77cb6b

Please sign in to comment.