Skip to content

feat(cuda): track device memory accesses across streams - #10721

Merged
0ax1 merged 1 commit into
developfrom
ad/cuda-driver-memory
Oct 23, 2026
Merged

0ax1 merged 1 commit into
developfrom
ad/cuda-driver-memory

Conversation

@0ax1

@0ax1 0ax1 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Device memory shared across streams needs ordered access and deallocation without redundant waits.

Solution

Add typed allocations/views, copies, pointer guards, pooled access events, and kernel launches.

Assessment

Depends on #10720; activated by #10722. The driver remains excluded from publishing.

@codspeed

codspeed Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.19%

3 warnings, 1 note

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Unable to measure the execution of 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 17 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

⚡ 1 improved benchmark
❌ 5 regressed benchmarks
✅ 2402 untouched benchmarks
⏩ 12 skipped benchmarks1
🗄️ 43 archived benchmarks run2

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation test_scan_filter[int] 2.8 ms 3.6 ms -23.19%
❌ CPU Simulation test_scan_filter_to_arrow_array[int_float] 3.5 ms 4.1 ms -13.95%
❌ Walltime bitpack_blocked_compress_avx2 6.7 µs 7.6 µs -11.8%
❌ CPU Simulation test_repeated_scan_filter[int_float] 3.4 ms 3.9 ms -11.38%
❌ CPU Simulation test_repeated_scan_filter[int] 2.4 ms 2.7 ms -10.28%
⚡ CPU Simulation decode_primitives[i64, (1000, 8)] 37.2 µs 23.8 µs +56.68%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ad/cuda-driver-memory (08dc2b8) with develop (b702068)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. 43 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩

@0ax1 0ax1 added the changelog/feature A new feature label Oct 23, 2026 — with ChatGPT Codex Connector
@0ax1
0ax1 force-pushed the ad/cuda-driver-memory branch from 38ad068 to fd26f0f Compare October 23, 2026 13:13
@0ax1
0ax1 force-pushed the ad/cuda-driver-resources branch from 8390bc7 to 7085828 Compare October 23, 2026 13:13
@0ax1
0ax1 requested a review from robert3005 October 23, 2026 14:50
@0ax1
0ax1 marked this pull request as ready for review October 23, 2026 14:51
@0ax1
0ax1 force-pushed the ad/cuda-driver-resources branch from 7085828 to b896d5d Compare October 23, 2026 16:00
Base automatically changed from ad/cuda-driver-resources to develop October 23, 2026 16:33
Add typed device allocations and views, host/device copies, pointer guards, pooled access events, and kernel launches. Order conflicting accesses and frees across streams while avoiding redundant waits. Include round-trip, cross-stream read, free-ordering, and event-pool tests. Existing consumers still use cudarc.

Original-commit: 5fd3f54eba
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1
0ax1 force-pushed the ad/cuda-driver-memory branch from fd26f0f to 08dc2b8 Compare October 23, 2026 16:34
@0ax1
0ax1 merged commit c7a6cc9 into develop Oct 23, 2026
133 of 139 checks passed
@0ax1
0ax1 deleted the ad/cuda-driver-memory branch October 23, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants