CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 19:32:45 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/tensorflow/tensorflow.git
etag: W/"f21a1471918ed16e547e656557a1700d"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ybbqvYi6fgkRPXQj07o2Xt6JaQw3922bkbQKnSO6pVViYE07a3%2Futnw4lm21EgX8NWQ5BMeTUTnQUDJcFxgZNnBsMQ%2BXQcTGNh3Hfxg1ZTXLdBSuPvBKfJN4QHCaTyP03Z2TtqIoDlqA8Fp9EMCsCmAbmqOik0fbG4%2FUXPMUo76%2FBdNyss%2BiTbRCEA6T%2FRxEti%2BNG7qmv0xAdJnKLmtUrluwzdTGECQYTIsaQk37uekLGV59%2FugM81M6%2B8el5COFokP3bvQSPa3SGGQaVuSZtw%3D%3D--gBZgPWITmY7cmbZy--jISrRpqvShaWitOiXxl4UA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.674204317.1752953564; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 19:32:44 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 19:32:44 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9CBA:2BEE38:7DBCC3:9DEA5E:687BF2DC
Switching the presized cuckoo map from using strict mod to Lemire's · tensorflow/tensorflow@a47a300 · GitHub
Copy file name to clipboardExpand all lines: tensorflow/core/util/presized_cuckoo_map.h
Copy file name to clipboardExpand all lines: tensorflow/core/util/presized_cuckoo_map_test.cc
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 74.8k
Commit a47a300
Switching the presized cuckoo map from using strict mod to Lemire's
uniform range mapping trick. Removes dependency on Eigen's TensorIntDiv,
which doesn't work properly on Android, is 10-20% faster on x86, and should be
much faster on Cuda if needed. (There are remaining optimizations to force
the use of __umulhi on cuda, but this table is designed for CPU, so I don't
see a reason to complicate things).
OLD:
CPU: Intel Haswell with HyperThreading (6 cores) dL1:32KB dL2:256KB dL3:15MB
Benchmark Time(ns) CPU(ns) Iterations
---------------------------------------------------
BM_CuckooFill/1000 14859 14846 46766
BM_CuckooFill/10M 835154969 834427162 100
BM_CuckooRead/1000 10 10 67484647
BM_CuckooRead/10M 56 56 10000000
NEW:
BM_CuckooFill/1000 12385 12374 56240
BM_CuckooFill/10M 696061920 695467681 100
BM_CuckooRead/1000 9 9 7872528
BM_CuckooRead/10M 44 44 15487881
This change will have bad consequences for people who violate the
table's requirement that keys be pre-hashed into random-looking
uint64's before inserting -- the table will not achieve its full
capacity. (It won't return wrong results, and will return an error
on insert.) That's a documented requirement, but we'll want to
make sure that nobody's misusing it.
Updates the TooManyKeys test to be more robust (assertion failure
if the table fails to fill during the fill phase), and to pre-hash
its keys as it should.
Change: 1319763921 parent 070f5c2 commit a47a300Copy full SHA for a47a300
File tree
Expand file treeCollapse file tree
2 files changed
+72
-29
lines changedFilter options
- tensorflow/core/util
Expand file treeCollapse file tree
2 files changed
+72
-29
lines changedtensorflow/core/util/presized_cuckoo_map.h
Copy file name to clipboardExpand all lines: tensorflow/core/util/presized_cuckoo_map.h+42-26Lines changed: 42 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
22 | 21 |
| |
23 | 22 |
| |
24 | 23 |
| |
| |||
44 | 43 |
| |
45 | 44 |
| |
46 | 45 |
| |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
47 | 72 |
| |
48 | 73 |
| |
49 | 74 |
| |
| |||
67 | 92 |
| |
68 | 93 |
| |
69 | 94 |
| |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 | 95 |
| |
75 | 96 |
| |
76 | 97 |
| |
77 | 98 |
| |
78 | 99 |
| |
79 | 100 |
| |
80 |
| - | |
81 |
| - | |
| 101 | + | |
| 102 | + | |
82 | 103 |
| |
83 | 104 |
| |
84 | 105 |
| |
| |||
107 | 128 |
| |
108 | 129 |
| |
109 | 130 |
| |
110 |
| - | |
111 |
| - | |
| 131 | + | |
| 132 | + | |
112 | 133 |
| |
113 | 134 |
| |
114 | 135 |
| |
| |||
180 | 201 |
| |
181 | 202 |
| |
182 | 203 |
| |
183 |
| - | |
| 204 | + | |
184 | 205 |
| |
185 |
| - | |
| 206 | + | |
186 | 207 |
| |
187 | 208 |
| |
188 | 209 |
| |
| |||
210 | 231 |
| |
211 | 232 |
| |
212 | 233 |
| |
213 |
| - | |
| 234 | + | |
214 | 235 |
| |
215 | 236 |
| |
216 |
| - | |
217 |
| - | |
| 237 | + | |
| 238 | + | |
218 | 239 |
| |
219 |
| - | |
| 240 | + | |
220 | 241 |
| |
221 | 242 |
| |
222 | 243 |
| |
| |||
306 | 327 |
| |
307 | 328 |
| |
308 | 329 |
| |
309 |
| - | |
310 |
| - | |
311 |
| - | |
312 |
| - | |
313 |
| - | |
314 |
| - | |
315 |
| - | |
316 |
| - | |
317 |
| - | |
318 |
| - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
319 | 336 |
| |
320 | 337 |
| |
321 | 338 |
| |
322 | 339 |
| |
323 | 340 |
| |
324 |
| - | |
325 | 341 |
| |
326 | 342 |
| |
327 | 343 |
| |
|
tensorflow/core/util/presized_cuckoo_map_test.cc
Copy file name to clipboardExpand all lines: tensorflow/core/util/presized_cuckoo_map_test.cc+30-3Lines changed: 30 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
25 | 45 |
| |
26 | 46 |
| |
27 | 47 |
| |
| |||
34 | 54 |
| |
35 | 55 |
| |
36 | 56 |
| |
37 |
| - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
38 | 60 |
| |
39 | 61 |
| |
40 | 62 |
| |
41 | 63 |
| |
42 | 64 |
| |
43 |
| - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
44 | 68 |
| |
45 | 69 |
| |
46 | 70 |
| |
47 | 71 |
| |
48 | 72 |
| |
49 | 73 |
| |
| 74 | + | |
50 | 75 |
| |
51 | 76 |
| |
52 | 77 |
| |
53 | 78 |
| |
54 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
55 | 82 |
| |
56 | 83 |
| |
57 | 84 |
| |
|
You can’t perform that action at this time.
0 commit comments