Question 1
value in Fig. 7.3.
Answer 1
Question 2
Consider performing a 1D convolution on array N = {4,1,3,2,3} with filter F = {2,1,4}. What is the resulting output array?
Answer 2
Question 3
What do you think the following 1D convolution filters are doing?
- (A) [0 1 0]
- (B) [0 0 1]
- (C) [1 0 0]
- (D) [−1/2 0 1/2]
- (E) [1/3 1/3 1/3]
Answer 3
Question 4
Consider performing a 1D convolution on an array of size N with a filter of size M:
- (A) How many ghost cells are there in total?
- (B) How many multiplications are performed if ghost cells are treated as multiplications (by 0)?
- (C) How many multiplications are performed if ghost cells are not treated as multiplications?
Answer 4
Question 5
Consider performing a 2D convolution on a square matrix of size N × N with a square filter of size M × M:
- (A) How many ghost cells are there in total?
- (B) How many multiplications are performed if ghost cells are treated as multiplications (by 0)?
- (C) How many multiplications are performed if ghost cells are not treated as multiplications?
Answer 5
Question 6
Consider performing a 2D convolution on a rectangular matrix of size N₁ × N₂ with a rectangular mask of size M₁ × M₂:
- (A) How many ghost cells are there in total?
- (B) How many multiplications are performed if ghost cells are treated as multiplications (by 0)?
- (C) How many multiplications are performed if ghost cells are not treated as multiplications?
Answer 6
Question 7
Consider performing a 2D tiled convolution with the kernel shown in Fig. 7.12 on an array of size N × N with a filter of size M × M using an output tile of size T × T.
- (A) How many thread blocks are needed?
- (B) How many threads are needed per block?
- (C) How much shared memory is needed per block?
- (D) Repeat the same questions if you were using the kernel in Fig. 7.15.
Answer 7
Question 8
Revise the 2D kernel in Fig. 7.7 to perform 3D convolution.
Answer 8
Question 9
Revise the 2D kernel in Fig. 7.9 to perform 3D convolution.
Answer 9
Question 10
Revise the tiled 2D kernel in Fig. 7.12 to perform 3D convolution.