Skip to content

Commit c29318f

Browse files
committed
tiling: fix edge case
1 parent a5f2f6a commit c29318f

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
@@ -634,7 +634,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
634634

635635
float tile_overlap_factor_x = (float)(input_tile_size * num_tiles_x - input_width) / (float)(input_tile_size * (num_tiles_x - 1));
636636
if (num_tiles_x <= 2) {
637-
if (input_width == input_tile_size) {
637+
if (input_width <= input_tile_size) {
638638
num_tiles_x = 1;
639639
tile_overlap_factor_x = 0;
640640
} else {
@@ -654,7 +654,7 @@ __STATIC_INLINE__ void sd_tiling(ggml_tensor* input, ggml_tensor* output, const
654654

655655
float tile_overlap_factor_y = (float)(input_tile_size * num_tiles_y - input_height) / (float)(input_tile_size * (num_tiles_y - 1));
656656
if (num_tiles_y <= 2) {
657-
if (input_height == input_tile_size) {
657+
if (input_height <= input_tile_size) {
658658
num_tiles_y = 1;
659659
tile_overlap_factor_y = 0;
660660
} else {

0 commit comments

Comments
 (0)