PointKernel opened a new pull request, #12: URL: https://github.com/apache/datasketches-cuda/pull/12
## Summary This PR migrates the Theta sketch to CUDA. `theta_sketch` keeps its retained hashes as a sorted device array, so an ordered uncompressed compact v3 image is a direct copy and `merge`, `intersect`, and `a_not_b` operate on that array directly. Images round trip with `datasketches::compact_theta_sketch`. Most of the work went into the update path. A single `screen_kernel` hashes each key, screens it against theta, and compacts the survivors with warp local aggregation, replacing a `cub::DeviceTransform` pass followed by a `cub::DeviceSelect::If` pass. `update()` also splits a large batch internally so theta tightens partway through the call, the way the CPU sketch tightens it on every insert; without that, a first batch gets sorted in full even though the sketch keeps only k. On a GH200 at `lg_k=12`, filling an empty sketch with 200M keys goes from 17.36 ms to 1.15 ms, and updating a saturated sketch with 180M keys goes from 1.48 ms to 0.74 ms. A block local `cuco` shared memory pre-filter was also tried and dropped, since it was slower cold and no faster than plain kernel fusion once warm. Note that each `update()` call still carries a fixed cost of roughly 113 us from the device to host count readbacks that size the next allocation, so callers should prefer fewer, larger batches. The new nvbench suite measures it directly in `theta_update_batched`. Removing that readback is the follow-up that also unblocks `update_async` and `merge_async`, which `hll_sketch` already has. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
