An open API service indexing awesome lists of open source software.

https://github.com/puzzlef/vector-multiplication-cuda

Comparing approaches for CUDA-based vector multiplication.
https://github.com/puzzlef/vector-multiplication-cuda

algorithm cuda map multiply operation pagerank primitive

Last synced: about 1 month ago
JSON representation

Comparing approaches for CUDA-based vector multiplication.

Awesome Lists containing this project

README

          

Comparing approaches for *CUDA-based* **vector multiplication**.

In each of the experiments given below, we multiply two floating-point vectors
`x` and `y`, with number of **elements** from `10^6` to `10^9` using OpenMP.
Each element count is attempted with various approaches, running each approach 5
times to get a good time measure. Multiplication here represents any
memory-aligned independent operation, or a `map()` operation.


### Adjusting Launch config

In this experiment ([adjust-launch]), we multiply two floating-point vectors `x`
and `y` using CUDA. Each element count is attempted with various **CUDA launch**
**configs**. Results indicate that a **grid_limit** of `16384/32768`, and a
**block_size** of `128/256` to be suitable for both **float** and **double**.
Using a **grid_limit** of `MAX` and a **block_size** of `256` could be a decent
choice.

[adjust-launch]: https://github.com/puzzlef/vector-multiplication-cuda/tree/adjust-launch


### Adjusting Thread duty

In this experiment ([adjust-duty]), we compare various *per-thread duty numbers*
for CUDA-based vector multiplication. Each element count is attempted with
various CUDA launch configs and per-thread duties. Results indicate no
significant difference between [adjust-launch] approach, and this one.

[adjust-duty]: https://github.com/puzzlef/vector-multiplication-cuda/tree/adjust-duty




## References

- [CUDA by Example :: Jason Sanders, Edward Kandrot](https://www.slideshare.net/SubhajitSahu/cuda-by-example-notes)
- [Git pulling a branch from another repository?](https://stackoverflow.com/a/46289324/1413259)




[![](https://i.imgur.com/azEBS7Y.png)](https://www.youtube.com/watch?v=vTdodyhhjww)
[![ORG](https://img.shields.io/badge/org-puzzlef-green?logo=Org)](https://puzzlef.github.io)
[![DOI](https://zenodo.org/badge/375073607.svg)](https://zenodo.org/badge/latestdoi/375073607)
![](https://ga-beacon.deno.dev/G-KD28SG54JQ:hbAybl6nQFOtmVxW4if3xw/github.com/puzzlef/vector-multiplication-cuda)

[Prof. Dip Sankar Banerjee]: https://sites.google.com/site/dipsankarban/
[Prof. Kishore Kothapalli]: https://faculty.iiit.ac.in/~kkishore/