Skip to content

fix: skip buffer validation if on device#6219

Merged
0ax1 merged 2 commits intodevelopfrom
ad/skip-device-buf-validation
Jan 30, 2026
Merged

fix: skip buffer validation if on device#6219
0ax1 merged 2 commits intodevelopfrom
ad/skip-device-buf-validation

Conversation

@0ax1
Copy link
Contributor

@0ax1 0ax1 commented Jan 30, 2026

No description provided.

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 added the changelog/fix A bug fix label Jan 30, 2026
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 enabled auto-merge (squash) January 30, 2026 12:16
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 30, 2026

Merging this PR will degrade performance by 30.15%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 5 improved benchmarks
❌ 16 regressed benchmarks
✅ 1158 untouched benchmarks
⏩ 1323 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bench_many_codes_few_values[2048] 369.1 µs 332.9 µs +10.89%
Simulation bench_many_codes_few_values[4096] 375.2 µs 338.9 µs +10.7%
Simulation bench_sparse_coverage[0.1] 366.8 µs 330.5 µs +10.97%
Simulation bench_sparse_coverage[0.5] 365.5 µs 329.2 µs +11.01%
Simulation bench_many_codes_few_values[1024] 366.5 µs 330.3 µs +10.98%
Simulation canonical_into_non_nullable[(10000, 10, 0.0)] 205.4 µs 279.2 µs -26.44%
Simulation canonical_into_non_nullable[(10000, 10, 0.01)] 232.6 µs 306.7 µs -24.15%
Simulation canonical_into_non_nullable[(10000, 10, 0.1)] 391.9 µs 465.7 µs -15.85%
Simulation into_canonical_non_nullable[(10000, 10, 0.01)] 234.9 µs 307.2 µs -23.56%
Simulation canonical_into_non_nullable[(10000, 100, 0.01)] 2.1 ms 3 ms -27.76%
Simulation canonical_into_non_nullable[(10000, 100, 0.0)] 1.9 ms 2.7 ms -29.98%
Simulation into_canonical_nullable[(10000, 10, 0.1)] 635.2 µs 714.9 µs -11.15%
Simulation into_canonical_non_nullable[(10000, 10, 0.0)] 207.5 µs 280.1 µs -25.94%
Simulation into_canonical_nullable[(10000, 10, 0.0)] 461.8 µs 537.8 µs -14.14%
Simulation into_canonical_non_nullable[(10000, 100, 0.01)] 2.2 ms 3 ms -27.57%
Simulation into_canonical_non_nullable[(10000, 100, 0.1)] 3.7 ms 4.5 ms -17.44%
Simulation canonical_into_non_nullable[(10000, 100, 0.1)] 3.7 ms 4.5 ms -17.45%
Simulation into_canonical_nullable[(10000, 100, 0.1)] 6.1 ms 6.9 ms -11.51%
Simulation into_canonical_nullable[(10000, 100, 0.0)] 4.4 ms 5.1 ms -13.29%
Simulation into_canonical_non_nullable[(10000, 10, 0.1)] 393.9 µs 469.8 µs -16.15%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing ad/skip-device-buf-validation (60bd955) with develop (cdf10a6)

Open in CodSpeed

Footnotes

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

@0ax1 0ax1 merged commit 1522642 into develop Jan 30, 2026
44 of 46 checks passed
@0ax1 0ax1 deleted the ad/skip-device-buf-validation branch January 30, 2026 12:23
Copy link
Contributor

Choose a reason for hiding this comment

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

this is wrong

return Ok(());
}

// Skip host-only validation when buffers are on the GPU.
Copy link
Contributor

Choose a reason for hiding this comment

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

we should validate anything on the CPU and maybe in debug move to CPU and check?

bytes.len()
);
// Skip host-only validation when buffers are on the GPU.
let offsets_on_device = offsets.buffer_handles().iter().any(|h| h.is_on_device());
Copy link
Contributor

@joseph-isaacs joseph-isaacs Jan 30, 2026

Choose a reason for hiding this comment

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

move to CPU and validate on CPU in debug mode?

AdamGS pushed a commit that referenced this pull request Feb 2, 2026
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
danking pushed a commit that referenced this pull request Feb 6, 2026
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants