For this programming exercise, you will write and characterize the behavior of a CUDA kernel that contains

Question:

For this programming exercise, you will write and characterize the behavior of a CUDA kernel that contains a high amount of data-level parallelism but also contains conditional execution behavior. Use the NVIDIA CUDA Toolkit along with GPU-SIM from the University of British Columbia (http://www.gpgpusim.

org/) or the CUDA Profiler to write and compile a CUDA kernel that performs 100 iterations of Conway’s Game of Life for a 256256 game board and returns the final state of the game board to the host. Assume that the board is initialized by the host. Associate one thread with each cell. Make sure you add a barrier after each game iteration. Use the following game rules:

■ Any live cell with fewer than two live neighbors dies.

■ Any live cell with two or three live neighbors lives on to the next generation.

■ Any live cell with more than three live neighbors dies.

■ Any dead cell with exactly three live neighbors becomes a live cell.

After finishing the kernel answer the following questions:

a. Compile your code using the –ptx option and inspect the PTX representation of your kernel. How many PTX instructions make up the PTX implementation of your kernel? Did the conditional sections of your kernel include branch instructions or only predicated non branch instructions?

b. After executing your code in the simulator, what is the dynamic instruction count? What is the achieved instructions per cycle (IPC) or instruction issue rate? What is the dynamic instruction breakdown in terms of control instructions, arithmetic-logical unit (ALU) instructions, and memory instructions?
Are there any shared memory bank conflicts? What is the effective off-chip memory bandwidth?

c. Implement an improved version of your kernel where off-chip memory references are coalesced and observe the differences in runtime performance.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Architecture A Quantitative Approach

ISBN: 9780128119051

6th Edition

Authors: John L. Hennessy, David A. Patterson

Question Posted: