Skip to content

Commit

Permalink
Pushing changes to GitHub Pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
docs-sched-rebuild committed Oct 12, 2023
1 parent 272d567 commit e54525d
Show file tree
Hide file tree
Showing 44 changed files with 640 additions and 32 deletions.
20 changes: 20 additions & 0 deletions master/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,20 +468,24 @@ <h3>On pure HBM mode:<a class="headerlink" href="#on-pure-hbm-mode" title="Perma
<tr class="row-odd"><th class="text-right head"><p>λ</p></th>
<th class="text-right head"><p>export_batch</p></th>
<th class="text-right head"><p>export_batch_if</p></th>
<th class="text-right head"><p>contains</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-right"><p>0.50</p></td>
<td class="text-right"><p>2.087</p></td>
<td class="text-right"><p>12.258</p></td>
<td class="text-right"><p>3.121</p></td>
</tr>
<tr class="row-odd"><td class="text-right"><p>0.75</p></td>
<td class="text-right"><p>2.045</p></td>
<td class="text-right"><p>12.447</p></td>
<td class="text-right"><p>3.094</p></td>
</tr>
<tr class="row-even"><td class="text-right"><p>1.00</p></td>
<td class="text-right"><p>1.950</p></td>
<td class="text-right"><p>2.657</p></td>
<td class="text-right"><p>3.096</p></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -535,20 +539,24 @@ <h3>On pure HBM mode:<a class="headerlink" href="#on-pure-hbm-mode" title="Perma
<tr class="row-odd"><th class="text-right head"><p>λ</p></th>
<th class="text-right head"><p>export_batch</p></th>
<th class="text-right head"><p>export_batch_if</p></th>
<th class="text-right head"><p>contains</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-right"><p>0.50</p></td>
<td class="text-right"><p>0.692</p></td>
<td class="text-right"><p>10.784</p></td>
<td class="text-right"><p>3.100</p></td>
</tr>
<tr class="row-odd"><td class="text-right"><p>0.75</p></td>
<td class="text-right"><p>0.569</p></td>
<td class="text-right"><p>10.240</p></td>
<td class="text-right"><p>3.075</p></td>
</tr>
<tr class="row-even"><td class="text-right"><p>1.00</p></td>
<td class="text-right"><p>0.551</p></td>
<td class="text-right"><p>0.765</p></td>
<td class="text-right"><p>3.096</p></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -602,20 +610,24 @@ <h3>On pure HBM mode:<a class="headerlink" href="#on-pure-hbm-mode" title="Perma
<tr class="row-odd"><th class="text-right head"><p>λ</p></th>
<th class="text-right head"><p>export_batch</p></th>
<th class="text-right head"><p>export_batch_if</p></th>
<th class="text-right head"><p>contains</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-right"><p>0.50</p></td>
<td class="text-right"><p>0.316</p></td>
<td class="text-right"><p>8.199</p></td>
<td class="text-right"><p>3.239</p></td>
</tr>
<tr class="row-odd"><td class="text-right"><p>0.75</p></td>
<td class="text-right"><p>0.296</p></td>
<td class="text-right"><p>8.549</p></td>
<td class="text-right"><p>3.198</p></td>
</tr>
<tr class="row-even"><td class="text-right"><p>1.00</p></td>
<td class="text-right"><p>0.288</p></td>
<td class="text-right"><p>0.395</p></td>
<td class="text-right"><p>3.225</p></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -668,20 +680,24 @@ <h3>On HBM+HMEM hybrid mode:<a class="headerlink" href="#on-hbm-hmem-hybrid-mode
<tr class="row-odd"><th class="text-right head"><p>λ</p></th>
<th class="text-right head"><p>export_batch</p></th>
<th class="text-right head"><p>export_batch_if</p></th>
<th class="text-right head"><p>contains</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-right"><p>0.50</p></td>
<td class="text-right"><p>0.318</p></td>
<td class="text-right"><p>8.086</p></td>
<td class="text-right"><p>3.122</p></td>
</tr>
<tr class="row-odd"><td class="text-right"><p>0.75</p></td>
<td class="text-right"><p>0.294</p></td>
<td class="text-right"><p>5.549</p></td>
<td class="text-right"><p>3.111</p></td>
</tr>
<tr class="row-even"><td class="text-right"><p>1.00</p></td>
<td class="text-right"><p>0.287</p></td>
<td class="text-right"><p>0.393</p></td>
<td class="text-right"><p>3.075</p></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -731,20 +747,24 @@ <h3>On HBM+HMEM hybrid mode:<a class="headerlink" href="#on-hbm-hmem-hybrid-mode
<tr class="row-odd"><th class="text-right head"><p>λ</p></th>
<th class="text-right head"><p>export_batch</p></th>
<th class="text-right head"><p>export_batch_if</p></th>
<th class="text-right head"><p>contains</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td class="text-right"><p>0.50</p></td>
<td class="text-right"><p>0.316</p></td>
<td class="text-right"><p>8.181</p></td>
<td class="text-right"><p>3.073</p></td>
</tr>
<tr class="row-odd"><td class="text-right"><p>0.75</p></td>
<td class="text-right"><p>0.293</p></td>
<td class="text-right"><p>8.950</p></td>
<td class="text-right"><p>3.052</p></td>
</tr>
<tr class="row-even"><td class="text-right"><p>1.00</p></td>
<td class="text-right"><p>0.292</p></td>
<td class="text-right"><p>0.394</p></td>
<td class="text-right"><p>3.026</p></td>
</tr>
</tbody>
</table>
Expand Down
50 changes: 25 additions & 25 deletions master/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ For Benchmark:
| 0.75 | 1.045 | 2.452 | 1.335 | 1.807 | 3.374 | 1.309 | 1.013 |
| 1.00 | 0.655 | 2.481 | 0.612 | 1.815 | 1.865 | 0.619 | 0.511 |

| λ | export_batch | export_batch_if |
|-----:|-------------:|----------------:|
| 0.50 | 2.087 | 12.258 |
| 0.75 | 2.045 | 12.447 |
| 1.00 | 1.950 | 2.657 |
| λ | export_batch | export_batch_if | contains |
|-----:|-------------:|----------------:|---------:|
| 0.50 | 2.087 | 12.258 | 3.121 |
| 0.75 | 2.045 | 12.447 | 3.094 |
| 1.00 | 1.950 | 2.657 | 3.096 |

* dim = 32, capacity = 128 Million-KV, HBM = 16 GB, HMEM = 0 GB

Expand All @@ -242,11 +242,11 @@ For Benchmark:
| 0.75 | 0.930 | 2.238 | 1.177 | 1.693 | 3.369 | 1.316 | 0.866 |
| 1.00 | 0.646 | 2.321 | 0.572 | 1.783 | 1.873 | 0.618 | 0.469 |

| λ | export_batch | export_batch_if |
|-----:|-------------:|----------------:|
| 0.50 | 0.692 | 10.784 |
| 0.75 | 0.569 | 10.240 |
| 1.00 | 0.551 | 0.765 |
| λ | export_batch | export_batch_if | contains |
|-----:|-------------:|----------------:|---------:|
| 0.50 | 0.692 | 10.784 | 3.100 |
| 0.75 | 0.569 | 10.240 | 3.075 |
| 1.00 | 0.551 | 0.765 | 3.096 |

* dim = 64, capacity = 64 Million-KV, HBM = 16 GB, HMEM = 0 GB

Expand All @@ -256,11 +256,11 @@ For Benchmark:
| 0.75 | 0.801 | 1.951 | 1.033 | 1.493 | 3.545 | 1.359 | 0.773 |
| 1.00 | 0.621 | 2.021 | 0.608 | 1.541 | 1.965 | 0.613 | 0.481 |

| λ | export_batch | export_batch_if |
|-----:|-------------:|----------------:|
| 0.50 | 0.316 | 8.199 |
| 0.75 | 0.296 | 8.549 |
| 1.00 | 0.288 | 0.395 |
| λ | export_batch | export_batch_if | contains |
|-----:|-------------:|----------------:|---------:|
| 0.50 | 0.316 | 8.199 | 3.239 |
| 0.75 | 0.296 | 8.549 | 3.198 |
| 1.00 | 0.288 | 0.395 | 3.225 |

### On HBM+HMEM hybrid mode:

Expand All @@ -272,11 +272,11 @@ For Benchmark:
| 0.75 | 0.083 | 0.122 | 0.111 | 0.129 | 3.221 | 1.274 |
| 1.00 | 0.073 | 0.123 | 0.095 | 0.126 | 1.854 | 0.617 |

| λ | export_batch | export_batch_if |
|-----:|-------------:|----------------:|
| 0.50 | 0.318 | 8.086 |
| 0.75 | 0.294 | 5.549 |
| 1.00 | 0.287 | 0.393 |
| λ | export_batch | export_batch_if | contains |
|-----:|-------------:|----------------:|---------:|
| 0.50 | 0.318 | 8.086 | 3.122 |
| 0.75 | 0.294 | 5.549 | 3.111 |
| 1.00 | 0.287 | 0.393 | 3.075 |

* dim = 64, capacity = 512 Million-KV, HBM = 32 GB, HMEM = 96 GB

Expand All @@ -286,11 +286,11 @@ For Benchmark:
| 0.75 | 0.049 | 0.069 | 0.049 | 0.069 | 3.116 | 1.242 |
| 1.00 | 0.047 | 0.072 | 0.047 | 0.070 | 1.771 | 0.607 |

| λ | export_batch | export_batch_if |
|-----:|-------------:|----------------:|
| 0.50 | 0.316 | 8.181 |
| 0.75 | 0.293 | 8.950 |
| 1.00 | 0.292 | 0.394 |
| λ | export_batch | export_batch_if | contains |
|-----:|-------------:|----------------:|---------:|
| 0.50 | 0.316 | 8.181 | 3.073 |
| 0.75 | 0.293 | 8.950 | 3.052 |
| 1.00 | 0.292 | 0.394 | 3.026 |

### Support and Feedback:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,39 @@ Program Listing for File merlin_hashtable.cuh
CudaCheckError();
}
void contains(const size_type n, const key_type* keys, // (n)
bool* founds, // (n)
cudaStream_t stream = 0) const {
if (n == 0) {
return;
}
read_shared_lock lock(mutex_, stream);
if (options_.max_bucket_size == 128) {
// Pipeline lookup kernel only supports "bucket_size = 128".
using Selector = SelectPipelineContainsKernel<key_type, value_type,
score_type, ArchTag>;
ContainsKernelParams<key_type, value_type, score_type> containsParams(
table_->buckets, table_->buckets_num, static_cast<uint32_t>(dim()),
keys, founds, n);
Selector::select_kernel(containsParams, stream);
} else {
using Selector = SelectContainsKernel<key_type, value_type, score_type>;
static thread_local int step_counter = 0;
static thread_local float load_factor = 0.0;
if (((step_counter++) % kernel_select_interval_) == 0) {
load_factor = fast_load_factor(0, stream, false);
}
Selector::execute_kernel(load_factor, options_.block_size,
options_.max_bucket_size, table_->buckets_num,
options_.dim, stream, n, d_table_,
table_->buckets, keys, founds);
}
CudaCheckError();
}
void erase(const size_type n, const key_type* keys, cudaStream_t stream = 0) {
if (n == 0) {
return;
Expand Down
16 changes: 16 additions & 0 deletions master/api/classnv_1_1merlin_1_1HashTable.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,22 @@ <h2>Class Documentation<a class="headerlink" href="#class-documentation" title="
</dl>
</dd></dl>

<dl class="cpp function">
<dt id="_CPPv4NK2nv6merlin9HashTable8containsEK9size_typePK8key_typePb12cudaStream_t">
<span id="_CPPv3NK2nv6merlin9HashTable8containsEK9size_typePK8key_typePb12cudaStream_t"></span><span id="_CPPv2NK2nv6merlin9HashTable8containsEK9size_typePK8key_typePb12cudaStream_t"></span><span id="nv::merlin::HashTable::contains__size_typeC.key_typeCP.bP.cudaStream_tC"></span><span class="target" id="classnv_1_1merlin_1_1HashTable_1a0f142e7f523b55111217b44b688a6d6a"></span><em class="property"><span class="pre">inline</span></em> <span class="pre">void</span> <code class="sig-name descname"><span class="pre">contains</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <a class="reference internal" href="#_CPPv4N2nv6merlin9HashTable9size_typeE" title="nv::merlin::HashTable::size_type"><span class="pre">size_type</span></a> <em><span class="pre">n</span></em>, <em class="property"><span class="pre">const</span></em> <a class="reference internal" href="#_CPPv4N2nv6merlin9HashTable8key_typeE" title="nv::merlin::HashTable::key_type"><span class="pre">key_type</span></a> <span class="pre">*</span><em><span class="pre">keys</span></em>, <span class="pre">bool</span> <span class="pre">*</span><em><span class="pre">founds</span></em>, <span class="pre">cudaStream_t</span> <em><span class="pre">stream</span></em> <span class="pre">=</span> <span class="pre">0</span><span class="sig-paren">)</span> <em class="property"><span class="pre">const</span></em><a class="headerlink" href="#_CPPv4NK2nv6merlin9HashTable8containsEK9size_typePK8key_typePb12cudaStream_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Checks if there are elements with key equivalent to <code class="docutils literal notranslate"><span class="pre">keys</span></code> in the table. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>n</strong> – The number of <code class="docutils literal notranslate"><span class="pre">keys</span></code> to check. </p></li>
<li><p><strong>keys</strong> – The keys to search on GPU-accessible memory with shape (n). </p></li>
<li><p><strong>founds</strong> – The result that indicates if the keys are found, and should be allocated by caller on GPU-accessible memory with shape (n). </p></li>
<li><p><strong>stream</strong> – The CUDA stream that is used to execute the operation. </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt id="_CPPv4N2nv6merlin9HashTable5eraseEK9size_typePK8key_type12cudaStream_t">
<span id="_CPPv3N2nv6merlin9HashTable5eraseEK9size_typePK8key_type12cudaStream_t"></span><span id="_CPPv2N2nv6merlin9HashTable5eraseEK9size_typePK8key_type12cudaStream_t"></span><span id="nv::merlin::HashTable::erase__size_typeC.key_typeCP.cudaStream_t"></span><span class="target" id="classnv_1_1merlin_1_1HashTable_1a25ba21644aea50d55f961234f5973d01"></span><em class="property"><span class="pre">inline</span></em> <span class="pre">void</span> <code class="sig-name descname"><span class="pre">erase</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <a class="reference internal" href="#_CPPv4N2nv6merlin9HashTable9size_typeE" title="nv::merlin::HashTable::size_type"><span class="pre">size_type</span></a> <em><span class="pre">n</span></em>, <em class="property"><span class="pre">const</span></em> <a class="reference internal" href="#_CPPv4N2nv6merlin9HashTable8key_typeE" title="nv::merlin::HashTable::key_type"><span class="pre">key_type</span></a> <span class="pre">*</span><em><span class="pre">keys</span></em>, <span class="pre">cudaStream_t</span> <em><span class="pre">stream</span></em> <span class="pre">=</span> <span class="pre">0</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N2nv6merlin9HashTable5eraseEK9size_typePK8key_type12cudaStream_t" title="Permalink to this definition"></a><br /></dt>
Expand Down
Loading

0 comments on commit e54525d

Please sign in to comment.