Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Please give a detailed answer: For the following vector addition kernel and the corresponding kernel launch code, answer each of the questions below, assuming that

Please give a detailed answer:
For the following vector addition kernel and the corresponding kernel launch code,
answer each of the questions below, assuming that the code is running on a GPU on nebula.
a)(3 pts) If the size n of the A,B, and C arrays is 50,000 elements each, how many thread
blocks are generated?
b)(3 pts) If the size n of the A, B, and C arrays is 50,000 elements each, how many warps are
there in each thread block?
c)(3 pts) If the size n of the A, B, and C arrays is 50,000 elements each, how many threads in
total will be created for the grid launched on line 20?
d)(3 pts) If the size n of the A,B, and C arrays is 50,000 elements each, is there any control
divergence (only some threads are working within a warp) during the execution of the
kernel? Explain why or why not. If so, identify the block number(s) and warp number(s) that
causes the control divergence.
e)(3 pts) Identify the line number(s) at which control diverges for each warp that you have
identified.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students explore these related Databases questions