Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-276

Conv Kernel Tiling

Problem

Count the output tiles of a tiled convolution loop: tiles_h = ceil(output_h / tile_h), tiles_w = ceil(output_w / tile_w), and the total is their product.

The signature is conv_kernel_tiles(output_h, output_w, tile_h, tile_w). Return [tiles_h, tiles_w, total].

Hint

Tiling keeps the working set in shared memory and registers.

Test cases

case 1
in: [28,28,8,8]
expected: [4,4,16]
case 2
in: [13,13,8,8]
expected: [2,2,4]
case 3
in: [1,1,1,1]
expected: [1,1,1]
case 4
in: [56,28,16,8]
expected: [4,4,16]
Starter codePython
def conv_kernel_tiles(output_h, output_w, tile_h, tile_w):
    # Your code here
    pass

4 test cases · run your code against them in the editor