In order to successfully complete this assignment you must do the required reading, watch the provided videos and complete all instructions. The embedded survey form must be entirely filled out and submitted on or before 11:59pm on Sunday March 7. Students must come to class the next day prepared to discuss the material covered in this assignment.
The following video shows you how to schedule basic CUDA jobs on the HPCC.
from IPython.display import YouTubeVideo
YouTubeVideo("HQejUtJtBlg",width=640,height=360)
from IPython.display import YouTubeVideo
YouTubeVideo("mLxZyWOI340",width=640,height=360)
✅ QUESTION: Why does a large stride lower performance?
Put your answer to the above question here.
The following is a great reference on how to access global memory effectively:
The following is a great reference on using Shared memory on cuda:
The basic syntac can be found here:
Static Shared memory:
__global__ void staticReverse(int *d, int n)
{
__shared__ int s[64];
int t = threadIdx.x;
int tr = n-t-1;
s[t] = d[t];
__syncthreads();
d[t] = s[tr];
}
Dynamic Shared Memory:
dynamicReverse<<<1, n, n*sizeof(int)>>>(d_d, n);
from IPython.display import YouTubeVideo
YouTubeVideo("RzPDlnZhxtQ",width=640,height=360)
✅ DO THIS: I found the following code on Github which does a reduction similar to the one shown in the above video. Download the code and get it working on the HPCC.
You will need to do the following
<512>
syntax error on line 217✅ DO THIS: Change the kernel
function pointer on line 233 to point to the five different kernel options. Try each one and record the timing differences as compared to the cpu. Fill out the following table.
Please fill out the form that appears when you run the code below. You must completely fill this out in order to receive credits for the assignment!
If you have trouble with the embedded form, please make sure you log on with your MSU google account at googleapps.msu.edu and then click on the direct link above.
✅ Assignment-Specific QUESTION: Were you able to get the CUDA reduction example working on the HPCC? If not, where did you get stuck?
Put your answer to the above question here
✅ QUESTION: Summarize what you did in this assignment.
Put your answer to the above question here
✅ QUESTION: What questions do you have, if any, about any of the topics discussed in this assignment after working through the jupyter notebook?
Put your answer to the above question here
✅ QUESTION: How well do you feel this assignment helped you to achieve a better understanding of the above mentioned topic(s)?
Put your answer to the above question here
✅ QUESTION: What was the most challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What was the least challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What kind of additional questions or support, if any, do you feel you need to have a better understanding of the content in this assignment?
Put your answer to the above question here
✅ QUESTION: Do you have any further questions or comments about this material, or anything else that's going on in class?
Put your answer to the above question here
✅ QUESTION: Approximately how long did this pre-class assignment take?
Put your answer to the above question here
from IPython.display import HTML
HTML(
"""
<iframe
src="https://cmse.msu.edu/cmse401-pc-survey"
width="100%"
height="500px"
frameborder="0"
marginheight="0"
marginwidth="0">
Loading...
</iframe>
"""
)
To get credit for this assignment you must fill out and submit the above survey from on or before the assignment due date.
Written by Dr. Dirk Colbry, Michigan State University
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.