Docsity

Georgia Tech CS4803DGC Spring 2009 Exam 2: CUDA Programming - Prof. Hyesoon Kim, Exams of Computer Science

Toggle sidebar
bg1
School of Computer Science
Georgia Institute of Technology
CS4803DGC, Spring 2009
Prof. Hyesoon Kim
Sample Exam2, March 12, 2009
Name :
GTID :
Problem 1 (10 points):
Problem 2 (15 points):
Problem 3 (15 points):
Problem 4 (10 points):
Problem 5 (10 points):
Problem 6 (10 points):
Total (70 points):
Note: Please be sure that your answers to all questions (and all supporting work that is required) are
contained in the space provided.
Note: Please be sure your name is recorded on each sheet of the exam.
GOOD LUCK!
pf3
pf4
pf5

Partial preview of the text

Download Georgia Tech CS4803DGC Spring 2009 Exam 2: CUDA Programming - Prof. Hyesoon Kim and more Exams Computer Science in PDF only on Docsity!

School of Computer Science Georgia Institute of Technology

CS4803DGC, Spring 2009 Prof. Hyesoon Kim

Sample Exam2, March 12, 2009

Name :

GTID :

Problem 1 (10 points):

Problem 2 (15 points):

Problem 3 (15 points):

Problem 4 (10 points):

Problem 5 (10 points):

Problem 6 (10 points):

Total (70 points):

Note: Please be sure that your answers to all questions (and all supporting work that is required) are contained in the space provided.

Note: Please be sure your name is recorded on each sheet of the exam.

GOOD LUCK!

Problem 1 (10 points):

Part a.(5 points) What is a non-blocking cache?

Part b.(5 points) What is predication (predicated code)?

Problem 3 (15 points):

Consider a GeForce-8 series architecture. In the CUDA program model, programmers can use a blockIdx to assign a different work to a different SM.

// producer code

if (blockIdx.x == 16) {

// perform producer work

G_sem[100] = 1; // G_sem a global memory data structure

}

// consumer code

if (blockIdx.x == 20) {

while(G_sem[100] != 1); // wait }

// consumer work

a.(10 points) Generally the above code doesn’t work. Explain why.

b.(5 points) There is a special case when the above code might work if some certain configuration conditions are satisfied. What are other conditions? Note that we do not change the existing hardware.

Problem 4 (10 points):

Part a.(5 points) What is a coalesced/uncoaled memory request?

Part b.(5 points) Why is it generally a good idea to increase the number of working threads in CUDA?

Problem 6 (10 points):

Part a.(5 points) Describe the major function of vertex processors and fragment processors in tradi- tional GPU architectures.

b.(5 points) In old GPGPU (before CUDA), most GPGPU programmers used the fragment processors and the texture cache for GPGPU programming. Why?