8000 gpu: transpose patches faster by a10y · Pull Request #6829 · vortex-data/vortex · GitHub
[go: up one dir, main page]

Skip to content

gpu: transpose patches faster#6829

Merged
a10y merged 5 commits intodevelopfrom
transpose-patches-fix
Mar 9, 2026
Merged

gpu: transpose patches faster#6829
a10y merged 5 commits intodevelopfrom
transpose-patches-fix

Conversation

@a10y
Copy link
Contributor
@a10y a10y commented Mar 6, 2026

Eliminate all of the wasteful allocating and deallocating, replace it with a 3-pass algorithm that reuses the buffers.

Drops the CPU transpose time by a factor of 5-10 in my benchmarks on the other branch

Tested using existing test suite

@a10y a10y added the changelog/performance A performance improvement label Mar 6, 2026
Eliminate all of the wasteful allocation, replace it
with a 3-pass algorithm that inserts indices/values directly
into their final positions.

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force 10000 -pushed the transpose-patches-fix branch from 4d3533b to c9e1e79 Compare March 6, 2026 16:52
@codspeed-hq
Copy link
codspeed-hq bot commented Mar 6, 2026

Merging this PR will improve performance by 26.44%

⚡ 5 improved benchmarks
✅ 995 untouched benchmarks
⏩ 1466 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation patched_take_10k_contiguous_patches 2.3 ms 2.1 ms +10.81%
Simulation patched_take_200k_dispersed 5.6 ms 4.7 ms +19.88%
Simulation patched_take_200k_first_chunk_only 5.4 ms 4.8 ms +11.99%
Simulation take_200k_dispersed 4.5 ms 3.6 ms +24.36%
Simulation take_200k_first_chunk_only 4.2 ms 3.3 ms +26.44%

Comparing transpose-patches-fix (32ee6e3) with develop (28e7b15)

Open in CodSpeed

Footnotes

  1. 1466 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.

@a10y a10y marked this pull request as ready for review March 6, 2026 17:18
@a10y a10y requested a review from 0ax1 March 6, 2026 17:23
}

// Loop over patches, writing them to final positions
let indices_out = indices_buffer.spare_capacity_mut();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a broader test coverage for transpose?

  • with non-zero offset
  • different value types, in particular 64bit as that changes the lane count to 16
  • array len % 1024 != 0

Copy link
Contributor
@0ax1 0ax1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Added one comment about adding more tests inline.

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y enabled auto-merge (squash) March 9, 2026 14:19
@a10y a10y disabled auto-merge March 9, 2026 14:19
@a10y
Copy link
Contributor Author
a10y commented Mar 9, 2026

I just pushed a test case generator, will merge once I verify it doesn't hurt CI times

a10y added 3 commits March 9, 2026 10:26
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y enabled auto-merge (squash) March 9, 2026 14:35
@a10y a10y merged commit b933a4e into develop Mar 9, 2026
49 checks passed
@a10y a10y deleted the transpose-patches-fix branch March 9, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0