Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 1: Weiyu Du #12

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
**University of Pennsylvania, CIS 565: GPU Programming and Architecture,
Project 1 - Flocking**

* (TODO) YOUR NAME HERE
* (TODO) [LinkedIn](), [personal website](), [twitter](), etc.
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
* Weiyu Du
* [LinkedIn](https://www.linkedin.com/in/weiyu-du/)
* Tested on: CETS virtual lab MOR100B-09, Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz

### (TODO: Your README)
### Boids Simulation
<img src="https://github.com/WeiyuDu/Project1-CUDA-Flocking/blob/master/images/boid.png" width="600"/>
<img src="https://github.com/WeiyuDu/Project1-CUDA-Flocking/blob/master/images/demo1.gif" width="600"/>

Include screenshots, analysis, etc. (Remember, this is public, so don't put
anything here that you don't want to share with the world.)
### Performance Analysis
1) Plot of number of boids versus frame rate without visualization (x axis: 5000, 10000, 20000, 50000)
<img src="https://github.com/WeiyuDu/Project1-CUDA-Flocking/blob/master/images/numboid_novis.png"/>
2) Plot of number of boids versus frame rate with visualization (x axis: 5000, 10000, 20000, 50000)
<img src="https://github.com/WeiyuDu/Project1-CUDA-Flocking/blob/master/images/numboid_vis.png"/>
3) Plot of block size versus frame rate (without visualization, x axis: 128, 256, 512, 1024)
<img src="https://github.com/WeiyuDu/Project1-CUDA-Flocking/blob/master/images/numblock.png"/>

### Questions
1) **For each implementation, how does changing the number of boids affect performance? Why do you think this is?**

Performance decreases as the number of boids increases. This is because more boids require more threads for kernels that require significant operations, for example kernUpdateVelNeighborSearch, kernUpdatePos, kernComputeIndices.

2) **For each implementation, how does changing the block count and block size affect performance? Why do you think this is?**

Performance does not change as block size increase. This is because larger block size would only require more threads for kernels that have very simple operation, for example kernResetIntBuffer.

3) **For the coherent uniform grid: did you experience any performance improvements with the more coherent uniform grid? Was this the outcome you expected? Why or why not?**

Yes, I experienced performance improvements with coherent uniform grid from scattered grid, but not as significant as from naive to scattered grid. This is the outcome I expect because we cut out the time to access dev_particleArrayIndices memory for each thread, which improves performance.

4) **Did changing cell width and checking 27 vs 8 neighboring cells affect performance? Why or why not?**

It does not affect performance much. We still have the same number of threads.
Binary file added images/boid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/demo1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/numblock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/numboid_novis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/numboid_vis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading