Question: Consider the following CUDA kernel and the corresponding host function that calls it: void foo _ kernel ( int * a , int * b
Consider the following CUDA kernel and the corresponding host function that
calls it:
void fookernelint a int b
unsigned int blockIdx.xblockDimx threadIdx.x;
if threadIdxx threadIdx.x
;
if
;
for unsigned int
;
void fooint ad int bd
unsigned int ;
fookernel ad bd ;
a What is the number of warps per block?
b What is the number of warps in the grid?
c For the statement on line :
i How many warps in the grid are active?
ii How many warps in the grid are divergent?
iii. What is the SIMD efficiency in of warp of block
iv What is the SIMD efficiency in of warp of block
v What is the SIMD efficiency in of warp of block
d For the statement on line :
i How many warps in the grid are active?
ii How many warps in the grid are divergent?
iii. What is the SIMD efficiency in of warp of block
e For the loop on line :
i How many iterations have no divergence?
ii How many iterations have divergence?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
