fix: skip buffer validation if on device#6219
Conversation
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Merging this PR will degrade performance by 30.15%
|
| 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)
Footnotes
-
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. ↩
| return Ok(()); | ||
| } | ||
|
|
||
| // Skip host-only validation when buffers are on the GPU. |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
move to CPU and validate on CPU in debug mode?
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
No description provided.