Skip to content

Commit edd6529

Browse files
committed
tiling: fix edge case
1 parent 2c76b7b commit edd6529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml_extend.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
627627

628628
float tile_overlap_factor_x = (float)(input_tile_size * num_tiles_x - input_width) / (float)(input_tile_size * (num_tiles_x - 1));
629629
if (num_tiles_x <= 2) {
630-
if (input_width == input_tile_size) {
630+
if (input_width <= input_tile_size) {
631631
num_tiles_x = 1;
632632
tile_overlap_factor_x = 0;
633633
} else {
@@ -647,7 +647,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
647647

648648
float tile_overlap_factor_y = (float)(input_tile_size * num_tiles_y - input_height) / (float)(input_tile_size * (num_tiles_y - 1));
649649
if (num_tiles_y <= 2) {
650-
if (input_height == input_tile_size) {
650+
if (input_height <= input_tile_size) {
651651
num_tiles_y = 1;
652652
tile_overlap_factor_y = 0;
653653
} else {

0 commit comments

Comments
 (0)