OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-SimpleGPUHashTable commits / 2280dbd

updated readme
2280dbd062c545278f41582c02aed3df21bb94b9
by David Farrell <nosferalatu@gmail.com> · 2020-03-05T07:19:05.000Z

Changed files (1) +13 -8

README.md +13 -8
……@@ -3,19 +3,24 @@
33# About
44
55This project shows how to implement a simple GPU hash table. Thanks to the high bandwidth and massive parallelism of
6GPU's, the result is a high performance hash table capable of insertion rates in the hundreds of millions of key/value
7pairs a second.
6GPU's, the result is a high performance hash table capable of hundreds of millions of operations per second.
87
98The code achieves an average insertion rate of 309 million key/second on my development laptop with an NVIDIA GTX 1060.
109
11This code uses atomic operations to insert key/value pairs into a lock free hash table on multiple GPU threads using linear
12probing. It uses CUDA for ease of development, but this can easily be ported to HLSL or GLSL.
10The code implements a lock free hash table using linear probing. Concurrent inserts, deletes, and lookups are supported by
11this hash table. The hash table works on 32 bit keys and 32 bit values (although 0xffffffff is reserved for both keys
12and values). The load factor of the table is set to 50% in the code, and the table size must be a power of two.
1313
14The hash table inserts 32 bit keys and 32 bit values. Deleting from the hash table is not implemented in this simple
15example, but it would be simple to implement deletion with tombstones. Similarly, lookups from the hash table are not
16implemented in this simple example, but would be a linear search through the table starting at the key's hash.
14Atomic operations are used to insert key/value pairs into the hash table on multiple GPU threads. It uses CUDA for ease
15of development, but could easily be ported to HLSL or GLSL. 64 bit keys and/or values could be supported using 64 bit
16atomics.
1717
18For more information on lock free hash table design, read Preshing on Programming's [The World's Simplest Lock Free Hash Table](https://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table/).
18Resizing the hash table is not implemented (it's a *simple* hash table!)
19
20For more information on lock free hash table design, read:
21* Preshing on Programming's [The World's Simplest Lock Free Hash
22Table](https://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table/)
23* Cliff Click's slides on (A Lock-Free Wait-Free Hash Table)[https://web.stanford.edu/class/ee380/Abstracts/070221_LockFreeHash.pdf]
1924
2025# Prerequisites
2126