- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
I am working to use SYCL to create hash table, similar to the code in following page.
https://developer.nvidia.com/blog/maximizing-performance-with-massively-parallel-hash-maps-on-gpus/
auto [old_k, old_v] = buckets[i].load(memory_order_relaxed);
// if the bucket is empty we can attempt to insert the pair
if (old_k == empty_sentinel) { // try to atomically replace the current content of the bucket with the input pair
bool success = buckets[i].compare_exchange_strong(
{old_k, old_v}, {k,v}, memory_order_relaxed);
if (success) { // store was successful
return true;
}
To create hash table parallel, will need to compare and exchange key and value pair in one atomic operation.
SYCL supports atomic compare_exchange_strong but only limited to scalar data type. It doesn't support some pair of key and value.
May I know any way to enable parallel hash table if atomic operation only support scalar data type?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sycl support atomic operation using a memory pointer. So, manage to create hash table by storing all key/value into some memory buffer. When insert the hash to the hash table, will use compare_exchange_strong with the pointer of the memory location that contains the key/value.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sycl support atomic operation using a memory pointer. So, manage to create hash table by storing all key/value into some memory buffer. When insert the hash to the hash table, will use compare_exchange_strong with the pointer of the memory location that contains the key/value.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page