-
Notifications
You must be signed in to change notification settings - Fork 374
Enable Miri tests in CI with non-blocking execution #697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: arrayka <[email protected]>
Co-authored-by: arrayka <[email protected]>
Co-authored-by: arrayka <[email protected]>
Co-authored-by: arrayka <[email protected]>
diskann-quantization/src/algorithms/transforms/double_hadamard.rs
Outdated
Show resolved
Hide resolved
…rt miri-specific changes Co-authored-by: arrayka <[email protected]>
…apply cfg!(miri) pattern to end_to_end_test Co-authored-by: arrayka <[email protected]>
…or_tests module for miri Co-authored-by: arrayka <[email protected]>
…istances_in_place Co-authored-by: arrayka <[email protected]>
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (77.27%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #697 +/- ##
==========================================
- Coverage 86.70% 86.70% -0.01%
==========================================
Files 398 398
Lines 74238 74262 +24
==========================================
+ Hits 64371 64387 +16
- Misses 9867 9875 +8
🚀 New features to boost your workflow:
|
arrayka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| @@ -390,11 +390,15 @@ mod tests { | |||
| // Heap of size 2. | |||
| fuzz_test_impl(2, 101, &mut rng); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add one miri-covered test with a heap size of like 10? Something that isn't a power of two but small enough to run quickly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| let num_data = if cfg!(miri) { | ||
| vec![0, 8, 9, 10, 11] | ||
| vec![7, 8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still include 0 - and some values above 8. Say [0, 7, 8, 10]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| cfg_if::cfg_if! { | ||
| if #[cfg(miri)] { | ||
| const MAX_DIM: usize = 128; | ||
| const MAX_DIM: usize = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is not a good one to set so low. It controls the upper bound for a decent number of SIMD kernels with unrolling parameters far above 8. I worry that setting this so low would not cover all branches.
Let's try something. Can we manually set the Miri cfg with
RUSTFLAGS="--cfg miri" cargo llvm-cov nextest --html --package diskann-quantization
We can then use the coverage information to see what's getting hit and what isn't with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, disabling this one if my biggest concern:
- The
BitTransposekernel this controls has a block size of 64. So really, the upper bound shouldn't be 128, but more like 132 or so. - The 1 and 2-bit X full-precision distances have block sizes of 32 and 16, respectively. Appropriate upper bounds would probably be around 80 and 55ish for good coverage.
One thing we could do is give the bit-transpose and full-precision tests diskann_wide::Architecture dependent upper bounds like the normal bit-slice distances. That would help save some wasted type in the fallback kernels which need less exhaustive testing.
✅ Enable Miri Tests in CI - Complete
All tasks completed successfully!
Summary
Successfully enabled Miri tests in the CI workflow with non-blocking execution and parallel processing. Tests have been optimized based on reviewer feedback.
Key Changes
.github/workflows/ci.ymlcontinue-on-error: trueto prevent CI blockingcargo +nightly miri nextest run --package diskann-quantizationtest_double_hadamardandtest_padding_hadamard(transforms)test_distances_in_place(kmeans/lloyds) - using#[cfg(not(miri))]for conditional compilationminmax_quantizer_testsmodule (entire test module)minmax_vector_testsmodule (entire test module)if cfg!(miri)pattern toend_to_end_testfor cleaner conditional setupCI Pipeline Structure
Time Impact Analysis
Quality & Security
The changes ensure Miri tests provide valuable feedback without blocking the CI pipeline or adding unnecessary complexity.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.