cs513_assignment_4's Introduction
MEMBERS Michael Sherman Subha Srikanth Kshitij Vidyut Shah Dhruv Dogra Description The Makefile compiles both the computation code, as well as generation for a test dataset. gen_file creates a file named input.txt, and populates it with randomly generated doubles. These doubles are generated in the range form 0, to a selected input. In addition, the number of matrices is specified. In the file, constants are defined for the maximum size of each matrix, for the ILABs, 32 was chosen. multiply executes the multiplication, and assumes input.txt is named as such. It reads the number of matrices, their sizes, and values from the file. It takes two arguments as well, one is to switch between sequential and parallel multiplcation, and the other is to specify output file name. Compilation: If needed, export the CUDA path with "export PATH=/usr/local/cuda/bin:${PATH}" Run make Usage First, execute gen_file. ./gen_file 0.17 100000 Then, execute multiply ./multiply tree out.txt Data structure Defined a matrix class, that stores x and y dimensions, as well as a device array of values. This is defined only for doubles. The class handles its own memory management, and supports indexing into the matrix as normal. Algorithms 1.) Sequential multiplication on the CPU 2.) Sequential multiplication on the GPU 3.) Optimized sequential multiplication on the GPU 4.) Binary tree parallel multiplication on the GPU 5.) Hybrid approach between 3 and 4. (Note: Assume for GPU that individual matrix elements are bein multiplied in parallel, sequential and parallel above refer to how many matrices are in parallel.) The goal is to keep all cores busy, while running a work-efficient algorithm. We do not have enough cores to run an inefficient algorithm, even if the time complexity is theoretically better for large numbers of cores. References http://stackoverflow.com/questions/2076624/c-matrix-class
cs513_assignment_4's People
Forkers
xitizzzRecommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.