Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started