Project #3: Your Choice!¶
Due: Thursday, August 15th at 11:59pm. No extensions can be used for Project #3
Getting started¶
For each assignment, a Git repository will be created for you on GitHub. However, before that repository can be created for you, you need to have a GitHub account. If you do not yet have one, you can get an account here: https://github.com/join.
To actually get your private repository, you will need this invitation URL:
Project #3 invitation (Please check the Post “Project #3 is ready” Ed)
When you click on an invitation URL, you will have to complete the following steps:
You will need to select your CNetID from a list. This will allow us to know what student is associated with each GitHub account. This step is only done for the very first invitation you accept.
Note
If you are on the waiting list for this course you will not have a repository made for you until you are admitted into the course. I will post the starter code on Ed so you can work on the assignment until you are admitted into the course.
You must click “Accept this assignment” or your repository will not actually be created.
After accepting the assignment, Github will take a few minutes to create your repository. You should receive an email from Github when your repository is ready. Normally, it’s ready within seconds and you can just refresh the page.
- You now need to clone your repository (i.e., download it to your machine).
Make sure you’ve set up SSH access on your GitHub account.
For each repository, you will need to get the SSH URL of the repository. To get this URL, log into GitHub and navigate to your project repository (take into account that you will have a different repository per project). Then, click on the green “Code” button, and make sure the “SSH” tab is selected. Your repository URL should look something like this: git@github.com:mpcs52072-sum24/proj3-GITHUB-USERNAME.git.
If you do not know how to use
git clone
to clone your repository then follow this guide that Github provides: Cloning a Repository
If you run into any issues, or need us to make any manual adjustments to your registration, please let us know via Ed Discussion.
Assignment¶
The final project gives you the opportunity to show me what you learned in this course and to build your own accelerated system. In particular, you should think about implementing a system in the domain you are most comfortable in (data science, machine learning, computer graphics, etc.). The system should solve a problem that can benefit from some form of parallelization. Similar to how the performance of an image processing system benefits from parallel data decomposition of an image. If you are having trouble coming up with a problem for your system to solve then consider the following:
Task 1: Minimum Requirements (75 points)¶
You are free to implement any GPU system you like. However, you are required to at least have the following features in your GPU system:
An input/output component that allows the program to read in data or receive data in some way. The system will perform some computation(s) on this input and produce an output result.
Task 1.a: A sequential implementation of the system. Make sure to provide a usage statement.
Task 1.b: Basic GPU Implementation using Optimizations: You are free to implement the GPU system any way you wish. However, you will be heavily graded on ensuring that you are using optimizations we discussed throughout the course that helps with accelerating performance. Make sure to review your code after your initial implementation to think over whether specific optimizations we discussed are beneficial to your performance. Please makes sure to read Task 2: Advanced Features section before implementing this requirement. As a reminder, here are few optimizations to keep in mind:
Memory Optimizations: global memory coalescing, shared memory allocation and coalescing/alignment.
Parallel reductions and scans
Kernel level concurrency configurations (grid and block sizes)
Thread coarsening
Provide a detailed write-up and analysis of your system. For this assignment, this write-up is required to have more detail to explain your GPU system since we are not giving you a problem to solve. See the System Write-up section for more details.
Provide all the dataset files you used in your analysis portion of your write up. If these files are to big then you need to provide us a link so we can easily download them from an external source.
These points also include design points. You should think about the modularity of the system you are creating. Think about splitting your code into appropriate functions, when necessary.
You must provide a script or specific commands that shows/produces the results of your system. We need to be able to enter in a single command in the terminal window and it will run and produce the results of your system. Failing to provide a straight-forward way of executing your system that produces its result will result in significant deductions to your score. We prefer running a simple command line script (e.g., shell-script or python3 script). However, providing a few example cases of possible execution runs will be sufficient enough.
You are free to use any additional standard/third-party libraries as you wish. However, all the parallel work is required to be implemented by you.
Task 2: System Write-up (15 points)¶
In prior assignments, we provided you with the input files or data to run experiments against a your system and provide an analysis of those experiments. For this project, you will do the same with the exception that you will produce the data needed for your experiments. In all, you should do the following for the writeup:
Run experiments with data you generate for both the sequential and parallel versions. As with the data provided by prior assignments, the data should vary the granularity of your system. For the GPU version, make sure you are experimenting on what grid and block sizes are providing the best performance.
You will produce one execution bar graphs (Please refer back to that
hw2
for a graph visual). The x-axis will represent running your system with various data sizes to see the execution time between the GPU and sequential version. You need to have at least 5 different problem size configurations. You are not required to run project 3 on the Peanut cluster. You can run it on your local machine. If you choose to run your system on your local machine then please state that in your report and the your machine specifications as well.
Please submit a report (pdf document, text file, etc.) summarizing your results from the experiments and the conclusions you draw from them. Your report should include your plot(s) as specified above and a self-contained report. That is, somebody should be able to read the report alone and understand what code you developed, what experiments you ran and how the data supports the conclusions you draw. The report must also include the following:
Describe your program and the problem it is trying to solve in detail.
A description of how you implemented your sequential and GPU solution. You probably want to discuss things like load balancing, latency/throughput, etc.
Describe the challenges you faced while implementing the system. What aspects of the system might make it difficult to parallelize? In other words, what to you hope to learn by doing this assignment?
Specifications of the testing machine you ran your experiments on (i.e. Core Architecture (Intel/AMD), Number of cores, operating system, memory amount, etc.)
What are the hotspots (i.e., places where you can parallelize the algorithm) and bottlenecks (i.e., places where there is sequential code that cannot be parallelized) in your sequential program? Were you able to parallelize the hotspots and/or remove the bottlenecks in the parallel version?
What limited your speedup? Is it a lack of parallelism? (dependencies) Communication or synchronization overhead? As you try and answer these questions, we strongly prefer that you provide data and measurements to support your conclusions.
Compare and contrast the two parallel implementations. Are there differences in their speedups?
Task 3: Advance Feature (10 points)¶
The above work guarantees a low A for the assignment. If you want a higher grade then you need to go the extra mile that adds more complexity to your system. Please add a separate section in your report the explicitly explaining the advance features you implemented and where in your code they are implemented. One to two paragraphs is enough for your explanation. You only need one advance feature.
Additional features could include:
- In your GPU component, using one of the work distribution mechanisms we discussed in the latter weeks:
Grid-level concurrency: streams, events, and etc.
Dynamic Parallelism
Uniform Memory
Multi-GPU usage
Please note: If you already added one of these features into your implementation from Task #1 then you will fulfill both Task 1 and Task 3 requirements.
Using a GPU pattern that we did not cover in class. For example, graph traversal, sorting/merging etc.
Don’t know What to Implement?¶
If you are unsure what to implement then by default you can implement the following machine learning algorithm with training data coming from your own domain of interest:
Grading¶
For this project, we grade as follows:
Task 1: 75%
Task 2: 15%
Task 3: 10%
Design, Style and Cleaning up¶
Before you submit your final solution, you should, remove
any
Printf
statements that you added for debugging purposes andall in-line comments of the form: “YOUR CODE HERE” and “TODO …”
Think about your function decomposition. No code duplication. This homework assignment is relatively small so this shouldn’t be a major problem but could be in certain problems.
As you clean up, you should periodically save your file and run your code through the tests to make sure that you have not broken it in the process.
Submission¶
Before submitting, make sure you’ve added, committed, and pushed all your code to GitHub. You must submit your final work through Gradescope (linked from our Canvas site) in the “Project #3” assignment page via two ways,
Uploading from Github directly (recommended way): You can link your Github account to your Gradescope account and upload the correct repository based on the homework assignment. When you submit your homework, a pop window will appear. Click on “Github” and then “Connect to Github” to connect your Github account to Gradescope. Once you connect (you will only need to do this once), then you can select the repsotiory you wish to upload and the branch (which should always be “main” or “master”) for this course.
Uploading via a Zip file: You can also upload a zip file of the homework directory. Please make sure you upload the entire directory and keep the initial structure the same as the starter code; otherwise, you run the risk of not passing the automated tests.
As a reminder, for this assignment, there will be no autograder on Gradescope. We will run the program the CS Peanut cluster and manually enter in the grading into Gradescope. However, you must still submit your final commit to Gradescope.