Sunteți pe pagina 1din 1

Homework 1

CIS 6930: Spring 2012


Assigned: 02/04/2012
Due Date: 02/12/2012 11:55 PM
You are not allowed to take or give any help in completing this assignment. It is an individual
assignment. You need to submit the report in PDF version in e-Learning website (Sakai) before
the deadline. Please include the sentence in bold on top of your submission: I have neither
given nor received any unauthorized aid on this assignment.
Total Points: 5 pts

The purpose of this homework is to get familiar with the CUDA programming and HPC
environment. You need to create the matrixMul program for the following three experiments.
You can refer to the matrixMul example used in the class. Note that in this assignment, you need
not consider using the shared memory. All matrices are located in global memory. Note also that
this assignment is running on Tesla nodes without L1 / L2 caches. After finishing your
experiments, you need to submit a short report through e-Learning.

Experiment 1: Write the CUDA program to multiply two matrices. The size of both matrices
is 16*16. You are allowed to use only 1 thread block.

Experiment 2: Write the CUDA program to multiply two matrices. The size of both matrices
is 512*512. You are allowed to use only 1 thread block.

Experiment 3: Write the CUDA program to multiply two matrices. The size of both matrices
is 512*512. You are allowed to use multiple thread blocks.

You need to test your program in HPC environment and document the execution times as
explained in the class. You need to measure kernel running time (measured from host) and
per thread clock ticks (measured from device) and report both of them. For per thread clock
ticks, since you may have different numbers for each thread (because of scheduling) you
need to report their average.

Report Format
Your report should contain your name, UFID and HPC account username. The honor code I
have neither given nor received any unauthorized aid on this assignment should also be
included. You need include in which HPC client and which device you ran the programs.
You need include the execution time for three experiments. You need to include the snapshots of
the terminal including the command line and the running times of your programs.
You need to answer the following questions in your report:
the execution time for experiment 2 and 3? Why?

Is there any difference between

S-ar putea să vă placă și